Tag: CSharp/日付と時刻
DateTime t1 = DateTime.Parse("2011/02/24 03:30"); DateTime t2 = DateTime.Parse("2011/08/11 12:23"); TimeSpan span = t2 - t1; Debug.WriteLine(span.TotalDays);
int lastDay = DateTime.DaysInMonth(2011, 9);