Hello,
I am having a hard time displaying the current time (with AM/PM and putting the correct '0' padding.
12:01 PM
7:08 AM
2:26 PM
The code above does not place the '0' for a single digit minute and also does not display AM PMCode:SYSTEMTIME st; GetLocalTime(&st); WORD hour = st.wHour; WORD minute = st.wMinute; WORD seconds = st.wSecond; TCHAR _time[MAX_PATH] = TEXT("\0"); wsprintf(_time, TEXT("%d:%1d %1d"), hour, minute, seconds);
How can i do this?