Boost logo

Boost Users :

Subject: Re: [Boost-users] date formatting problem
From: Jeff Garland (azswdude_at_[hidden])
Date: 2008-12-01 08:16:21


Sergey Skorokhodov wrote:
> Hi,

Hi Sergey -

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

Jeff


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