Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to calculate a length of time?

Status
Not open for further replies.

jayjay60

Programmer
Jun 19, 2001
97
FR
I would like to know if i could simply do the difference between 2 COleDateTime variable, if i would know the length of time between them.
m_LenghtOfTime=m_Date2-m_Date1; ?

thanks in advance

jayjay
 
ColeDateTime has the operatpors +,-,=, so what?
 
the operator +,-... coulmd be used only with a COleDateTime and a COleDateTimeSpan, so i don't know what is the length of time i have to substract to a COleDateTime, but i want to calculate this length. Do you know what i mean?
 
If I understand correctly, U want get the difference between 2 COleDateTime objects. Time difference. E.g. 4:10:04 and 5:12:05 the dif will be 01:02:01. Right? Maybe not, because this is :
COleDateTime timeStart, timeEnd;
COleDateTimeSpan spanElapsed = timeEnd - timeStart;

 
ok this what i want to know.
thanks for your help

jayjay
 
look in time.h is a function diftime John Fill
1c.bmp


ivfmd@mail.md
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top