DateTime dt = new DateTime(); dt = DateTime.Now.AddMonths(1); int x = DateTime.DaysInMonth(dt.Year, dt.Month); MessageBox.Show(x.ToString()); // works ok - 31 >
DateTime dt = new DateTime(); dt = DateTime.Now.AddMonths(1); int x = DateTime.DaysInMonth(dt.Year, dt.Month); MessageBox.Show(x.ToString()); // works ok - 31
Try DateTime.ToString(format) method.
DateTime.ToString(format)
DateTime dt = new DateTime(); String dayName=dt.ToString("ffffd");