how do I find out how many days between 2 days?

C

could.net

I want to get these 2 values in c++ without using mfc:
1. how many days between current date and 0001-1-1
2. how many milliseconds elapsed since 00:00 of today.

I would like to do this by only c++ or c runtime functions.

Thanks in advance.
 
V

Victor Bazarov

I want to get these 2 values in c++ without using mfc:
1. how many days between current date and 0001-1-1
2. how many milliseconds elapsed since 00:00 of today.

I would like to do this by only c++ or c runtime functions.

What's stopping you?
 
S

Salt_Peter

I want to get these 2 values in c++ without using mfc:
1. how many days between current date and 0001-1-1
2. how many milliseconds elapsed since 00:00 of today.

I would like to do this by only c++ or c runtime functions.

Thanks in advance.

mfc is not C++ and it doesn't use C++ in any way either.

Did you mean "how do I find out how many days between 2 _dates_ ?

If so, how do you _store_ a date or time?
After all, isn't that a requirement of the problem domain at hand?
 
B

Bo Yang

(e-mail address removed) :
I want to get these 2 values in c++ without using mfc:
1. how many days between current date and 0001-1-1
2. how many milliseconds elapsed since 00:00 of today.

I would like to do this by only c++ or c runtime functions.
I think you can take a look at the boost datetime library !
 

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,756
Messages
2,569,533
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top