Re: [Cppcms-users] Parsing time from a string into date_time?
Brought to you by:
artyom-beilis
|
From: Artyom B. <art...@ya...> - 2012-04-19 11:19:02
|
>
> Does this work for both string-to-date_time as wells as date_time-to-string?
>
> I'm aware of strftime, and all, but that's in reverse. I'm looking
> for
> something like time_input_facet that's in boost::posix_time allowing me to
> parse a string/char into time.
>
> Perhaps something like
>
> istringstram ss("2001-12-12");
> date_time dt;
>
> ss >> format("%Y-%m-%d") >> dt;
>
It works, with manipulators:
ss >> booster::locale::as::ftime("%Y-%m-%d") >> dt;
It requires CppCMS to be compiled with ICU.
Artyom
|