方法一:
DateTime.Today.AddDays(-1).ToString("yyyy-MM-dd")
方法二:
TimeSpan span = new DateTime(2005,2,11,22,22,44,555) - new DateTime(2004,9,1,1,1,1,1);
int int_day=span.Days;
int int_hour=span.Hours;
int int_min=span.Minutes;
int int_sec=span.Seconds;
int int_millisec=span.Milliseconds;