CTime简单用法

CTime t = CTime::GetCurrentTime();
int year    = t.GetYear();
int month   = t.GetMonth();
int date    = t.GetDay();
int hour    = t.GetHour();
int minute  = t.GetMinute();
int second  = t.GetSecond();
CString str;
str.Format("%d-%02d-%02d\r\n   %02d:%02d:%02d", year,month, date, hour, minute, second);

你可能感兴趣的:(CTime简单用法)