CTimeSpan(
LONG lDays,
int nHours,
int nMins,
int nSecs
);
//////求差值====================================
Ctime T1=CTime::GetCurrentTime();
CTime T2(2018,8,10,0,0,0);
CTimeSpan timespan=T1-T2;
int nSeconds=time.GetTotalSeconds();//獲取時間差的總秒數
int nDays=time.GetDays();//獲取時間差中的天
int nHours=time.GetHours();//獲取時間差中的時
int nMinutes=time.GetMinutes();//獲取時間差中的分鐘
int nSec=time.GetSeconds();//獲取時間差中的秒鐘
////時間增加一天=========================================
CTime m_time=CTime::GetCurrentTime() + CTimeSpan(1,0,0,0);
//時間增加一個小時
CTime m_time=CTime::GetCurrentTime()+CTimeSpan(0,1,0,0);
//分鐘和秒數方法相同。