我在贴子里有看到取明天的。
CTime cTomorrow=CTime::GetCurrentTime()-CTimeSpan(1,0,0,0);
CString sTomorrow=cTomorrow.Format("%Y年%m月%d日");
但是不知道昨天是怎么取出来的???
CTime cTomorrow=CTime::GetCurrentTime()-CTimeSpan(1,0,0,0);
CString sTomorrow=cTomorrow.Format("%Y年%m月%d日");
但是不知道昨天是怎么取出来的???
CString sTomorrow=cTomorrow.Format("%Y年%m月%d日");
这段代码取得其实是昨天的日期,而不是明天的日期,取明天的日期,用+,而不是-
CTime cYestodayOnceMore=CTime::GetCurrentTime()-CTimeSpan(1,0,0,0);
??????
CTimeSpan 是用来表示时间跨度的类.