date/time
C / C++ / MFC
3
Posts
3
Posters
0
Views
1
Watching
-
How can i get the locale system time and date? Can u give some examples? Please help me.. Thanks everybody...
Try this, a simple one (MFC)
CTime t = CTime::GetCurrentTime();
struct tm* osTime; // A pointer to a time structure (TIME.H)
osTime = t.GetLocalTm( NULL );
ASSERT( osTime->tm_mon == 2 ); // Note zero-based month!Sonork 100.41263:Anthony_Yio
-
How can i get the locale system time and date? Can u give some examples? Please help me.. Thanks everybody...
i hope following will help u CTime stime = CTime::GetCurrentTime(); CString s = stime.Format("%A, %B %d, %Y,%I:%M : %S :%p" ); AfxMessageBox(s); chk it take care