Function LastdayInMonth(byVal datDate)
'move to the next month
datDate = dateadd("m",1,datDate)
'move back one day from first day in this month
datDate = dateadd("d",-1,month(datDate) & "/1/" & year(datDate))
'return date as last day in this month
LastdayInMonth= datDate
End Function
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.