How to get the Last Day of a particular month.
-
Thursday, January 11, 2007 6:34 AMHi I need to find the last day of a particular month (for example the last day of Feb 2007 is 28). How can I get this. I will be thankful if you help me regarding this.
All Replies
-
Thursday, January 11, 2007 8:04 AM
Hi,
Here is an example:
int
month = 12;
int year = 2006;
int numberOfDays = DateTime.DaysInMonth(year, month);
DateTime lastDay = new DateTime(year, month, numberOfDays);Greetz,
Geert
Geert Verhoeven
Consultant @ Ausy Belgium -
Monday, August 15, 2011 1:17 AM
thank you very much.
Larrix- Proposed As Answer by Larrix Monday, August 15, 2011 1:17 AM
-
Monday, August 15, 2011 6:27 AMThanks! :)
-
Thursday, May 03, 2012 8:20 PM
Awesome!
Thanks!

