那还不容易?
%H   Hours in the current day
%M   Minutes in the current hour
%S 还有,该类也提供有相应的函数获取GetHour()  GetMinute().....

解决方案 »

  1.   


    =============================================%H   Hours in the current day
    %M   Minutes in the current hour
    %S   Seconds in the current minute=============================================COleDateTime t = COleDateTime::GetCurrentTime();
    CString str = t.Format("%Y-%m-%d %H:%M:%S");
      

  2.   

    请问Data Time picker控件能显示小时和分钟的信息吗?
    我现在把它和Coledatatime变量绑定,请问还应该做什么?
      

  3.   

    Data   Time   picker可以设置时,分,秒,把format的参数改为time就可以了,但只显示时、分、秒
      

  4.   

    将CTime改为COleDateTime:
    http://msdn2.microsoft.com/en-us/library/yt32ce9h(VS.80).aspx
      

  5.   

    Set方法:
    http://msdn2.microsoft.com/en-us/library/kt1kwxwa(VS.80).aspx
      

  6.   

    学习!牛人!以前没有仔细读过MSDN这个说明。
      

  7.   

    CString str = t.Format("%Y-%m-%d %H:%M:%S");