//返回格式:2020-09-19 01:44:40 CString 取现行时间(CString 格式 = _T("%d-%#02d-%#02d %#02d:%#02d:%#02d")){ SYSTEMTIME st; CString 时间; GetLocalTime(&st); 时间.Format(格式, st.wYear, st.wMonth, st.wDay, st.wHour, st.wMinute, st.wSecond); return 时间; }