CodeItBetter Programming Another VB Programming Blog

How to get last day of the month

Posted on January 4, 2009
1
2
3
4
5
6
7
8
'Date & Time - How to get last day of the month
Option Explicit
 
Public Function LastDayInMonth(dDate As Date)
    LastDayInMonth = Format(DateSerial(Year(dDate), Month(dDate) + 1, 0), "DDDD")
End Function
'How can I call this function:
'Debug.Print LastDayInMonth(Date)
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


 

No trackbacks yet.