how to convert std::chromo::time_point to sting

Jan 18, 2016 at 3:30pm
Hello guys,

I want to convert std::chrono::time_point to string like this: "201601181150"

I tried to do this but everything i'd tried didn't work.

if you advise me or give a tip, I'd really appreciated.
Last edited on Jan 18, 2016 at 3:30pm
Jan 18, 2016 at 4:48pm
You can convert the time_point into a time_t then use one of the ctime functions to covert to a string.
http://www.cplusplus.com/reference/chrono/time_point/time_point/
Topic archived. No new replies allowed.