ASP.NET – How to get Days of the month.

Here is a single line code , help you to get the number of days in a particular month.

if you wanted to get for the complete years , then you need to put this code in a loop and changed the year and month numbers. 

Date.DaysInMonth(Now.Year, Now.Month)

Advertisements

3 thoughts on “ASP.NET – How to get Days of the month.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s