Avatar

Level 10

There is no need to enter the seconds to the time fields to calculate with times.

But it's neccessary to use the correct time pattern in the script.

The same mentioned above uses the pattern HH:MM to parse the formattedValue.

If your time fields uses another pattern like HH:MM A (01:23 AM) to display the time you have to change it in the entire script otherwise the returned value is always 0.

if (Table1.Row4.Cell2 ne null and Table1.Row5.Cell2 ne null) then

if (Time2Num(Table1.Row4.Cell2.formattedValue, "HH:MM A") lt Time2Num(Table1.Row5.Cell2.formattedValue, "HH:MM A")) ...