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 this
string day = DateTime.Now.ToString("ffffd");