TCHAR      text[128];

SYSTEMTIME st;

int        result = 0;

 

GetLocalTime (&st);

 

result = GetDateFormat(LOCALE_USER_DEFAULT, DATE_SHORTDATE, &st, NULL, text, 128);

if (result)

{

        // printf (text);

}

 

result = GetTimeFormat(LOCALE_USER_DEFAULT, /*LOCALE_NOUSEROVERRIDE*/0, &st, _T("HH:mm:ss"), text, 128);

if (result)

{

        // printf (text);

}

 

Posted by 셈말짓기 :