http://www.chrispearson.org/pages/programming/vbscript/datework/misc/easydays.asp
08h55
Friday, 21. November 2008

EASY DAYS . . .

It happens that using day zero in a date serial works for returning the last day of the previous month (The 0th day of February is the last day of January, that is)

So, with the current month being November, and next month being December, the code

Day(DateSerial(Year(Now), Month(Now)+1, 0)

returns the value 30 , the number of days in November 2008

Back to Days in a month article

xxx,xxx

copyright ©2000 - 2008 Chris Pearson