Boost logo

Boost Users :

From: Alexandre Gacon (alexandre.gacon_at_[hidden])
Date: 2006-03-22 09:34:56


boost::date_time::date_input_facet* pMyFacet = new
boost::date_time::date_input_facet( "%m-%d-%Y" );
std::locale loc( std::locale::classic(), pMyFacet );

std::istringstream ss;
ss.str( "22-03-2006" );

Boost::gregorian::date myDate;

ss >> myDate;

Normally, myDate must be initialized to the 22-03-2006 like indicated.

Alexandre

-----Message d'origine-----
De : boost-users-bounces_at_[hidden]
[mailto:boost-users-bounces_at_[hidden]] De la part de Christian Henning
Envoyé : mercredi 22 mars 2006 15:01
À : boost-users_at_[hidden]
Objet : Re: [Boost-users] [date_time] How to create a date
fromstringwithspecific format?

Alexandre,
this was my initial approach of the problem, but somehow I couldn't figure
out how to construct the data or time object?

ptime oTime
ss >> oTime; //???????

Thanks,
Christian
_______________________________________________
Boost-users mailing list
Boost-users_at_[hidden]
http://lists.boost.org/mailman/listinfo.cgi/boost-users


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net