Wednesday, October 7, 2009

Last Day of the Month

So I finally got tired of using my old method to determine the Last Day of the Month.  Which invovled adding a month to the date and them backing into the last day.

And now instead I will just use the built in function Date.DaysInMonth(year, month)!


Dim iLastDay as Integer = Date.DaysInMonth(2009,9)

iLastDay would equal 30.

No comments:

Post a Comment