C++ function for comparing two date strings...

A

ad

I'm trying to compare two dates (mm/dd/yyyy) and get their differences
by mm, dd and yyyy separated. Is there a c++ function library I can
use? or do I need to parse each string individually and then change it
to int like old days?
Do appreciate if someone shines a light to my problem...
AD
 
V

Victor Bazarov

ad said:
I'm trying to compare two dates (mm/dd/yyyy) and get their differences
by mm, dd and yyyy separated. Is there a c++ function library I can
use? or do I need to parse each string individually and then change it
to int like old days?

There are conversion functions (see <locale> header, 'std::time_get'
class template). If your time fits into one of the supported formats,
you won't need to reimplement the conversion.

V
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top