ctime format

G

Gary Wessle

Hello

I have been playing around all day on how to convert a time epoch to a
string in the format of my choice.

ctime puts out Thu Feb 1 18:32:14 2007
but I want 2007-2-1 18:32:14

any ideas, I tried with boost but it is an overkill.
// date_input_facet* inf = new date_input_facet();
// f->format("%a %b %d %H:%M:%S %Y"); // file:///usr/share/doc/boost-1.33.1/date_time/date_time_io.html
// date_output_facet* outf = new

then got stuck.

thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,816
Latest member
SapanaCarpetStudio

Latest Threads

Top