Applecore Pages on Microsoft Access

The last day of the month

If you wish to get the last day of the month, like the Excel Function EOMONTH, then you can do this by finding the 0th day of the next month, which is in fact also the last day of the current month:

Function fLastDayInMonth(dtmDate As Date) As Date
    fLastDayInMonth=DateSerial(Year(dtmDate),Month(dtmDate)+1,0)
End Function

Top

 


HOME | NEW | TABLES | QUERIES | FORMS | REPORTS | GENERAL | API | DOWNLOADS | TUTORIAL | RESOURCES
E-MAIL
Copyright & Disclaimer

 

Last modified at 06/06/2006 14:54:29