Hi i have two fields which i've pulled from my tables which are time fields, but are held as strings in the database. So i've converted them both to time with the following formulas:
//@time_started
Time (ToNumber (Left (Maximum ({OPERATORLOG.TimeStarted}, {OPERATORLOG.OperatorCode}), 2)), ToNumber (Mid (Maximum ({OPERATORLOG.TimeStarted}, {OPERATORLOG.OperatorCode}), 3, 2)), ToNumber (Right (Maximum ({OPERATORLOG.TimeStarted}, {OPERATORLOG.OperatorCode}), 2)))
//@time_finished
Time (ToNumber (Left (Maximum ({OPERATORLOG.TimeFinished}, {OPERATORLOG.OperatorCode}), 2)), ToNumber (Mid (Maximum ({OPERATORLOG.TimeFinished}, {OPERATORLOG.OperatorCode}), 3, 2)), ToNumber (Right (Maximum ({OPERATORLOG.TimeFinished}, {OPERATORLOG.OperatorCode}), 2)))
I now wanna take the time finished away from the time started to find the total time taken. However when i do this i get a number returned. How can i turn this into hour, mins and secs? i've tried placing the total time taken formula into a time funtion i.e
time({@time_taken})
but it just returns 00.00.00, any ideas please?
thanks
//@time_started
Time (ToNumber (Left (Maximum ({OPERATORLOG.TimeStarted}, {OPERATORLOG.OperatorCode}), 2)), ToNumber (Mid (Maximum ({OPERATORLOG.TimeStarted}, {OPERATORLOG.OperatorCode}), 3, 2)), ToNumber (Right (Maximum ({OPERATORLOG.TimeStarted}, {OPERATORLOG.OperatorCode}), 2)))
//@time_finished
Time (ToNumber (Left (Maximum ({OPERATORLOG.TimeFinished}, {OPERATORLOG.OperatorCode}), 2)), ToNumber (Mid (Maximum ({OPERATORLOG.TimeFinished}, {OPERATORLOG.OperatorCode}), 3, 2)), ToNumber (Right (Maximum ({OPERATORLOG.TimeFinished}, {OPERATORLOG.OperatorCode}), 2)))
I now wanna take the time finished away from the time started to find the total time taken. However when i do this i get a number returned. How can i turn this into hour, mins and secs? i've tried placing the total time taken formula into a time funtion i.e
time({@time_taken})
but it just returns 00.00.00, any ideas please?
thanks