Applecore Pages on Microsoft Access

Number of days in the month

If you want to calculate the number of days in the month then you can simply return the 0th day of the next month, which is the last day of the current month:

Function fDaysInMonth(dtmDate As Date) As Integer
    fDaysInMonth = Day(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:56:55