
H all I am using posix time to print the current timestamp into a string. boost::posix_time::ptime now( boost::posix_time::microsec_clock::local_time() ); std::string nowString = boost::posix_time::to_iso_extended_string( now ); The output is the following being T the date-time separator 2002-01-31T10:00:01,123456789 Is there any way to change the 'T' char separator with another character or string? I need a space instead of a 'T' Thanks AFG

std::string nowString = boost::posix_time::to_iso_extended_string( now );
Is there any way to change the 'T' char separator with another character or string? std::string nowString = boost::posix_time::to_simple_string ( now ); http://www.boost.org/doc/libs/1_43_0/doc/html/date_time/posix_time.html#date... (conversion to string)

If I use std::string nowString = boost::posix_time::to_simple_string ( now ); I will have the month outputted using litterals like ths. 2002-Jan-31T10:00:01.123456789 I need to stick to digits On Thu, Jul 15, 2010 at 2:48 PM, Patrick Loney < patrick.loney@interactivets.com> wrote:
std::string nowString = boost::posix_time::to_iso_extended_string( now );
Is there any way to change the 'T' char separator with another character or string?
std::string nowString = boost::posix_time::to_simple_string ( now );
http://www.boost.org/doc/libs/1_43_0/doc/html/date_time/posix_time.html#date...
(conversion to string)
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (3)
-
Conoscenza Silente
-
Mika Heiskanen
-
Patrick Loney