开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜