CString GetTimeStr()
        CTime time;
        // 获取当前时间
        time = CTime::GetCurrentTime();
        CString sTime;
        // 格式化时间串
        sTime = time.Format("%Y/%m/%d,%H:%M:%S  ");
        return sTime;

Abbreviated weekday name
Full weekday name
Abbreviated month name
Full month name
Date and time representation appropriate for locale
Day of month as decimal number (01 – 31)
Hour in 24-hour format (00 – 23)
Hour in 12-hour format (01 – 12)
Day of year as decimal number (001 – 366)
Month as decimal number (01 – 12)
Minute as decimal number (00 – 59)
Current locale's A.M./P.M. indicator for 12-hour clock'
Second as decimal number (00 – 59)
Week of year as decimal number, with Sunday as first day of week (00 – 53)
Weekday as decimal number (0 – 6; Sunday is 0)
Week of year as decimal number, with Monday as first day of week (00 – 53)
Date representation for current locale
Time representation for current locale
Year without century, as decimal number (00 – 99)
Year with century, as decimal number
%z, %Z
Either the time-zone name or time zone abbreviation, depending on registry settings; no characters if time zone is unknown
Percent sign