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

Subtract start time from end time - Need result as fraction of an hour

Status
Not open for further replies.

projecttoday

Programmer
Feb 28, 2004
208
US
Is there any way to get a calculated time in fractions of an hour? Right now I'm using

DateDiff("h",[starttime],[endtime]))

but if the time between starttime and endtime is 6 and 1/2 hours it shows on the report as 6. (General Number/Auto decimals). When I change the format of the fields to Fixed with 2 decimal places it shows as 6.00.

Robert
 

Hi,

faq68-5827.

Time can be displayed to the nearest tenth of a second.

Skip,
[glasses]Don't let the Diatribe...
talk you to death![tongue]

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
DateDiff("n", [starttime], [endtime])) / 60

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
OOps, sorry for the typo:
DateDiff("n", [starttime], [endtime]) / 60

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top