
24 Oct
2011
24 Oct
'11
5:03 p.m.
I have the following code: std::string db_time() { typedef boost::posix_time::ptime TimeT; TimeT ct = boost::posix_time::microsec_clock::local_time(); std::stringstream ss; boost::local_time::local_time_facet* output_facet = new boost::local_time::local_time_facet("%Y-%m-%d %h:%m:%s"); ss.imbue(std::locale(std::locale::classic(), output_facet)); ss << ct; return ss.str(); } Currently, the following string is returned: 2011-Oct-24 12:43:05.476990 How do I get the month as "10" and not as "Oct"? Ken Murphy