CTime time;
CString strDate;
strDate = time.Format("%d年%d月%d日", time.GetYear(), time.GetMonth(), time.GetDay());
// time 未初始化,默認 1970-01-01
CTime time = CTime::GetCurrentTime(); // 靜態方法獲取當前時間
CString strDate;
strDate.Format(_T("%d年%02d月%02d日"), time.GetYear(), time.GetMonth(), time.GetDay());
AfxMessageBox(strDate);