CTime tmpTime = CTime::GetCurrentTime();
//假设得到Tuesday, 08/20/02
我想要把它转换成“星期二,2002年8月20日”
并把它存入buf数组中,
谢谢!

解决方案 »

  1.   

    我是这样做的,帮忙看一下,谢谢!
    char timebuf[100];
    CTime tmpTime1 =  CTime::GetCurrentTime();

    tmpTime1.GetTime();
    strcat( timebuf ,(LPSTR)(LPCTSTR)tmpTime1.Format("%H:%M:%S") );
    strcat( timebuf , " "); tmpTime1.GetYear();
    strcat( timebuf ,(LPSTR)(LPCTSTR)tmpTime1.Format("%Y") );
    strcat( timebuf , "年"); tmpTime1.GetMonth();
    strcat( timebuf ,(LPSTR)(LPCTSTR)tmpTime1.Format("%B") );
    strcat( timebuf , "月"); tmpTime1.GetDay();
    strcat( timebuf , (LPSTR)(LPCTSTR)*/tmpTime1.Format("%d") );
    strcat( timebuf , "日 ");