1) Get the date/time using time. This will return a time_t
2) Convert the time_t to struct tm using either gmtime for UTC/GMT or localtime
3) Format the date/time using strftime
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.