How to get the number of days in a month

This is a good idea to get the number of days of any month

'For current month...

MsgBox DateAdd("m", 1, Now) - Now

'For some other month (Example: June)

Dim FirstDate As Date
FirstDate = "01/06/2006"
MsgBox DateAdd("m", 1, FirstDate) - FirstDate

0 comments:

Post a Comment