// How to get local date+time...
SYSTEMTIME systime; GetLocalTime(&systime); char str[256]; sprintf(str, "Today is the: %d, %d %d", systime.wDay, systime.wMonth, systime.wYear); MessageBox(NULL, str, "Local Date", MB_OK); sprintf(str, "The time is: %d:%d:%d", systime.wHour, systime.wMinute, systime.wSecond); MessageBox(NULL, str, "Local Time", MB_OK); |