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

Time to Decimals 1

Status
Not open for further replies.

JJOHNS

MIS
Sep 12, 2001
171
US
Here's the problem: I have a start time and an end time, something like this:

Start: 3:32:16
End: 6:02:22

I need to be able to represent the total time as a decimal, 2.5. Does anyone know how to do this?

 
([EndTime] - [StartTime]) * 24
should do the trick

Access dates are stored as floating point numbers. The 'whole' part is the number of days, the fractional part is the portion of a day. Multiplying a date by 24 converts it into hours.
 
Thanks a bunch beetee. I wasted a lot of hours trying to figure that out. Works great.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top