CTime tmpTime1(1901,1,1,0,0,1);
CTime tmpTime2(2003,4,2,0,0,1);
CTimeSpan ts = tmpTime1-tmpTime;
为什么从ts.GetDays()中取出来的天数数值不对呢??
CString test;
signed int xxx;
xxx = ts.GetDays();
test.Format("%d",xxx);
MessageBox(0,test,"",MB_OK);
显示为12144,是不是数据类型问题??
CTime tmpTime2(2003,4,2,0,0,1);
CTimeSpan ts = tmpTime1-tmpTime;
为什么从ts.GetDays()中取出来的天数数值不对呢??
CString test;
signed int xxx;
xxx = ts.GetDays();
test.Format("%d",xxx);
MessageBox(0,test,"",MB_OK);
显示为12144,是不是数据类型问题??
nYear 1970–3000
nMonth 1–12
nDay 1–31
nHour no constraint
nMin no constraint
nSec no constraint you can use COleDateTime instead.