CTime time=CTime::GetCurrentTime(); // 获取系统时间
    CString s = time.Format("%Y年 %m月 %d日   %H:%M:%S");
   MessageBox(s);  //显示当前的日期和时间

相关文章: