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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calculate Time

Status
Not open for further replies.

davman2002

Programmer
Nov 4, 2002
75
US
I am trying to calculate the value of time remaining time between three variables. For example: If I have 32 hours and 30 minutes and that time was calculated at 12:00 PM and I want to know how much time it would take before I reach 40 hours. My problem is the I am not sure about the datetime options in Borland. How do I do a date difference between 40 hours and 32.3 hours which would be 7.3 not 7.7 (7.7 is what I am getting) and then add that time (7.3) to the current time in a datetime box?
 
#include <time.h>
double difftime(time_t time2, time_t time1);

Borland C++ 5.0 Programmer's Guide

tomcruz.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top