End Time - Start Time Query result problem

Hargo

Registered User.
Local time
Today, 01:02
Joined
Sep 4, 2014
Messages
19
Hi

I have a query with a calculated field (Duration: [End Time] - [Start Time])


When I run the query the result appears to show the duration as a percentage of a day

i.e. End Time 13:00 - Start Time 12:00 = 1 Hour Duration Shows 4.166666666666666E-02

If I format the field 00:00

I get 00:00 rather than the hoped for 01:00

I have looked at various time calculation threads but I don't have the VBA skills to understand most of them

Any suggestions gratefully received
 
What are the data types set for the two fields?
If they are dates they are stored internally as datepart.timepart as a decimal number. so subtracting one from the other will give you effectively 12345.020202 - 12345.010101 which is a pretty small number.

I had to do the following to get a similar result correctly displayed as minutes; Hours is more interesting :)

OnSiteTimeMins: (60*Format([CallFinishTime]-[ArrivalTime],"h")+(Format([CallFinishTime]-[ArrivalTime],"nn")))
 

Users who are viewing this thread

Back
Top Bottom