What am I doing so wrong?
You get "not-a-date-time" because that is not a valid date: 1922 wasn't a leap year, so there were only 28 days in February.
Your code works as expected for me if I change it to a valid date such as 1922-02-28
or 1924-02-29
.
Is there any easier way to convert string in such a popular form to boost::gregorian:date?
boost::gregorian::date d = boost::gregorian::from_string(s_date);