GetLastDayOfMonth |
| Description: | |
| This is a small function that returns the last day of a month that it's passed. 8/19/2002: Simplified code with a suggestion from Dennis Borg. | |
| Code: | |
Public Function GetLastDayOfMonth(FromDate As Date) As Date
GetLastDayOfMonth = DateSerial(Year(FromDate), Month(FromDate) + 1, 0)
End Function
| |
| Sample Usage: | |
Debug.Print GetLastDayOfMonth(#12/1/1999#) | |