CTime cTime = CTime::GetCurrentTime(); CString msg; msg.Format("%u",cTime .GetTime()); AfxMessageBox(msg);//返回結果:13位的字符串。若是須要返回YY:MM:DD,請google