Calculating Date from Number of Seconds.
-
Dear Friends, I need to calculate the future date from number of seconds available from now. Can anybody help me out? Which all classes i can use for this calculation?
-
Dear Friends, I need to calculate the future date from number of seconds available from now. Can anybody help me out? Which all classes i can use for this calculation?
CTime and CTimeSpan ...
CTimeSpan sPan(0,0,0, 86400 );// 1 day CTime CurTime = CTime::GetCurrentTime(); CurTime += sPan; CString csTime = CurTime.Format(\_T("%A, %B %d, %Y")); AfxMessageBox( csTime );
nave [OpenedFileFinder]
modified on Tuesday, April 15, 2008 5:16 AM
-
CTime and CTimeSpan ...
CTimeSpan sPan(0,0,0, 86400 );// 1 day CTime CurTime = CTime::GetCurrentTime(); CurTime += sPan; CString csTime = CurTime.Format(\_T("%A, %B %d, %Y")); AfxMessageBox( csTime );
nave [OpenedFileFinder]
modified on Tuesday, April 15, 2008 5:16 AM
Thanks Naveen for such quick response. actually i have tried these two things but i dont need the number of days i directly want the date. For example from now if 24 hrs are there then i need date as 16 Apr. i dont want as 1 day. could you please help me out for this?
-
Thanks Naveen for such quick response. actually i have tried these two things but i dont need the number of days i directly want the date. For example from now if 24 hrs are there then i need date as 16 Apr. i dont want as 1 day. could you please help me out for this?
I modified the post with example, pls check it. From CTime, you can get the date, not the number of days...
nave [OpenedFileFinder]
-
I modified the post with example, pls check it. From CTime, you can get the date, not the number of days...
nave [OpenedFileFinder]
Thank u so much.. it worked...