COleDateTime currdate;
COleDateTime prevdate;
COleDateTime nextday;
currdate = COleDateTime::GetCurrentTime();
CString csTime= currdate.Format(); //current date and time
COleDateTimeSpan span(1,0,0,0);
int nDay = currdate.GetDay(); //current day
prevdate = currdate - span;
nextday = currdate + span;
int nPrevDay = prevdate.GetDay(); //yesterday or Previous day
int nNextDay = nextday.GetDay(); //next day
No comments:
Post a Comment