vc++中输入1970年1月1日或之前的时间后,运行就出错,具体如何解决。请高手明示

解决方案 »

  1.   

    vc 时间类的有效范围为: 1970 --> 2038 ,超出该范围的都将出错的。注意。。
      

  2.   

    MFC下的时间支持基本上都是有起始界线的CTime 
    CTime objects can be used to represent dates between January 1, 1970, and January 18, 2038. CTime objects have a resolution of 1 second. CTime is based on the time_t data type, defined in the Run-Time Library Reference.CFileTime
    The date and time value is stored as a 64-bit value representing the number of 100-nanosecond intervals since January 1, 1601. 参考 http://msdn.microsoft.com/zh-cn/library/6ahxxcsz.aspx
      

  3.   


    MFC 中的 COleDateTime 类,支持范围要广。