basic boost date_time input format question

Posted by Chris H on Stack Overflow See other posts from Stack Overflow or by Chris H
Published on 2010-04-10T05:17:02Z Indexed on 2010/04/10 5:23 UTC
Read the original article Hit count: 333

Filed under:
|

I've got a pointer to a string, (char *) as input. The date/time looks like this:
Sat, 10 Apr 2010 19:30:00
I'm only interested in the date, not the time. I created an "input_facet" with the format I want:

boost::date_time::date_input_facet inFmt("%a %d %b %Y");

but I'm not sure what to do with it. Ultimately I'd like to create a date object from the string. I'm pretty sure I'm on the right track with that input facet and format, but I have no idea how to use it.

Thanks.

© Stack Overflow or respective owner

Related posts about c++

Related posts about boost-date-time