Boost logo

Boost Users :

Subject: Re: [Boost-users] date formatting problem
From: Sergey Skorokhodov (ucayalyfish_at_[hidden])
Date: 2008-12-01 09:22:12


Hi,

Thanks a lot! It's really easy. Guess it's Friday evening kind of
problem as I searched for date_input_facet and failed. :( Maybe, it
should be emphasized in docs that date_time_input_facet should be used
for both date's and dates_time's? Just to add example with date input?

Anyway, thanks a lot!

> There are 2 facets -- one for input and one for output, so your problem
> is easily solved. See
>
> http://www.boost.org/doc/libs/1_37_0/doc/html/date_time/date_time_io.html#date_time.date_input_facet
>
>
>
>> I'm trying to read dates in "%d%m%Y" (DDMMYYYY). Unfortunately, it
>> doesn't work. Here is the code:
>>
> ...snip...
>
>> int main()
>> {
>> try {
>> date dt( not_a_date_time );
>>
>> date_facet* facet(new date_facet("%d%m%Y"));
> ^^^^^^^^^^ ^^^^^^^^^^
> date_input_facet date_input_facet
>


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