AnsweredAssumed Answered

Calculating time across midnight

Question asked by monzay on Sep 7, 2017
Latest reply on Sep 7, 2017 by billfox

I have a form that captures time related to water main break.


Time called out, time system shut down and time system is in back in service. Each of these values is stored in a time field.


To calculate the water loss in minutes I'm using int((${TimeSysShutDown}-${TimeCalled}) div (1000*60))

To calculate the length of the shutdown I'm using int((${TimeSysBackInService}-${TimeSysShutDown}) div (1000*60))


If the water gets shutdown at 1030 pm and turned back on at 130 am the calculation show -1270 minutes when it should show 180 minutes.


How do I set this up to capture the correct number of minutes when time crosses midnight?