I’m struggling a little getting some C++ code to cooperate. Is there a straight forward way to subtract two dates that are strings? I’m trying to get the number of days between them. They are strings, YYYYMMDD. Is the Boost library the right direction to go?
I’m struggling a little getting some C++ code to cooperate. Is there a straight
Share
Yes, Boost Date_Time can certainly do that even others may suggest “lighter” alternatives.
Here is the example about the days alive which does almost exactly your problem (just add a second date parsing):