Get the no ofdays in a month

Madhu.b.rokkam
Posted by Madhu.b.rokkam under C# category on | Points: 40 | Views : 1740
DateTime.DaysInMonth(year, month) this returns the no of days in the given year and given month.

Eg:

Console.Write(DateTime.DaysInMonth(2011, 2));


output:
28

Comments or Responses

Posted by: Anithachowdhary on: 3/28/2011 Level:Starter | Status: [Member] | Points: 10
Console.Write(DateTime.DaysInMonth(2011, 2));

Login to post response