???????????????

解决方案 »

  1.   

    see the link below, so many samples there :http://www.codeproject.com/datetime/Enjoy !
      

  2.   

    CTime time=CTime::GetCurrentTime();
    CString str;
    str.Format("%d:%d:%d", time.GetHour(), time.GetMinute(), time.GetSecond);
    MessageBox(str, MB_OK);
      

  3.   

    最好去查MSDN CTime,查看成员函数,里面有一些例子,看完就明白了。GOODLUCK!
      

  4.   

    CTime tm(2002,10,23,10,19);
    tm.GetYear();
    tm.GetCurrentTime();等函数,都很简单另外CTime还可以直接由time_t结构和SYSTEMTIME结构来直接构造
    CTime(
       const SYSTEMTIME& st,
       int nDST = - 1 
    )
    还有CTimeSpan代表两个时间之间的间隔,也很方便
      

  5.   

    CTime  time;
    time=CTime::GetCurrentTime();
    CString szA;
    szA=time.Format("现在的时间是:%Y年%m月%d日:%H:%M:%S");