MFC 下取得系统时间

 

 

CString   sTime,sYear,sMonth,sDay;   
SYSTEMTIME   CurTime;   
GetLocalTime(
& CurTime);   
sYear.Format(
" %d " ,CurTime.wYear);   
sMonth.Format(
" %d " ,CurTime.wMonth);   
sDay.Format(
" %d " ,CurTime.wDay);   
sTime
= sYear + sMonth + sDay;   
AfxMessageBox(sTime);   

 

你可能感兴趣的:(MFC 下取得系统时间)