Hi,
I have two text fields that store an open and a close time. I was able to convert the text field to a time field. However, I am trying to track how long it took for a service order to close from the time it was opened. It can vary from a few minutes to a few days. In addition, I have an open date field and a closed date that I am using for my calculation.
This is the formula I am using datetime({@Date Closed},{@Time Closed}) - datetime({@Date Opened},{@Time Opened}) but my times are not coming out correct. I believe that I need to convert my time to military for this to work.
Text to Time
if isnull({tvw_BacklogBreakdown.TimeClosed}) or {tvw_BacklogBreakdown.TimeClosed} = " "
then
CurrentTime
else
(
StringVar Time1;
NumberVar Hour1;
NumberVar Minute1;
NumberVar Second1;
Time1 := {tvw_BacklogBreakdown.TimeClosed};
Hour1 := tonumber(Time1[12 to 13]);
Minute1 := tonumber(Time1[15 to 16]);
Second1 := tonumber(Time1[18 to 19]);
time(Hour1, Minute1, Second1)
)
Any assistance would be appreciated.
Thanks,
Reuel