c++ - converting 8/17/2003 to boost::gregorian::date -
i attempting convert 8/17/2003
boot::gregorian::date
using following code
std::string test = "08/17/2013"; date d(from_simple_string(test));
however unhandled exception suggestion on how accomplish ?
from boost examples:
// following date in iso 8601 extended format (ccyy-mm-dd) std::string s("2001-10-9"); //2001-october-09 date d(from_simple_string(s)); std::cout << to_simple_string(d) << std::endl;
you have format incorrect.
Comments
Post a Comment