Friday, November 28, 2014

C# Code to get Last day of a month


 
  Method Name : DateTime.DaysInMonth()
  int DateTime.DaysInMonth(year,month)
  Eg:

  txtNoOfDays.Text = DateTime.DaysInMonth(Convert.ToDateTime(txtDate.Text).Year, Convert.ToDateTime(txtDate.Text).Month).ToString();  


No comments:

Post a Comment