How to get total number of days in a month based on year?
I am using a drop down lists for selecting the month and year in .aspx page. I have to get last date of the selected month of particular selected year in .aspx.cs page开发者_JAVA技巧. (some months have 30 days and some have 31 days)
How can I do this?
Regards,
N.SRIRAM
You can use:
System.DateTime.DaysInMonth(int year, int month)
System.DateTime.DaysInMonth this should help you.
精彩评论