Monday, March 26, 2012

working with dates

Is there an easy way to detirmine the last day of a month?what do you mean?
Take the first day of the following month and subtract 1 day from it.
Use the DateTime structure. This will return the number of days:

New DateTime(year, month, 1).AddMonths(1).AddDays(-1).Day
(Next Month, minus one day)

0 comments:

Post a Comment