How to convert time to string in Linux?

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.
closed account (z05DSL3A)

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

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