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!

SubTrack Start Time from End Time

Status
Not open for further replies.

rwn

Technical User
Dec 14, 2002
420
US
I have two times, a Start Time and an End Time. I need to find the total time between the Start and the End. This will indicate how long a shift runs. So the other issue could be a shift starts at 11:00 pm and ends the following day at 6:00am

I have this formula:
time({Shift_Day.End_Time}) - time({Shift_Day.Start_Time}).

But the value displayed is incorrect.

Thanks for any advise.
 
It is likely returning a value in minutes. If this is not what you want you can convert it to hours or hours and minutes.

If this is not that is happening can you display a sample start and end time and the results you see?

-- Jason
"It's Just Ones and Zeros
 
OOPS!.....SECONDS. It is likely returning SECONDS

-- Jason
"It's Just Ones and Zeros
 
Please tell us the datatype of your fields. If they are strings, please show how they display. You either need to add/keep the date as part of the calculation and then use:

datediff("s",{table.startdttime},{table.enddttime})

Or, if you need the calculation within a particular date, you can adjust each field in the same way, e.g., subtracting 6 hours from each, so that the results all fall within the same date.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top