cplusplus.com
C++ : Forum : UNIX/Linux Programming : How to convert time to string in Linux?
 
cplusplus.com
Information
Documentation
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs


post How to convert time to string in Linux?

albogp (4)
Hi all,

Is there anyone know how to convert time to string with a defined format (in linux) ? In Unix, we can cftime() function, but I can't find it in Linux. Linux has ctime() and ctime_r() function, but we can't define the string format with those function.

Thanks.
Grey Wolf (2845)

Does this help?
http://www.cplusplus.com/reference/clibrary/ctime/strftime.html
Last edited on
albogp (4)
Hi Grey Wolf,

Thank you very much. I have used strftime() function and the problem is solved.
Topic archived. No new replies allowed.