string StrDate0, StrDate1, StrDate2, StrDayOfWeek, StrTime0, StrTime1, StrTime2;
DateTime CurDate = DateTime.Now;
StrDate0 = CurDate.Year.ToString("0000") +
CurDate.Month.ToString("00") +
CurDate.Day.ToString("00");
StrDate1 = CurDate.ToShortDateString();
StrDate2 = CurDate.ToLongDateString();
StrDate0 = CurDate.Hour.ToString("00") +
CurDate.Minute.ToString("00") +
CurDate.Second.ToString("00");
StrTime1 = CurDate.ToShortDateString();
StrTime2 = CurDate.ToLongDateString();
StrDayOfWeek = CurDate.DayOfWeek.ToString();
DayOfWeek StrDayofWeek1 = CurDate.DayOfWeek;int StrDayofWeek2 = (int)CurDate.DayOfWeek;