Calculate TIME. TotalTime:=StopTime-StartTime

How can I calculate the difference between StopTime and StartTime? StopTime and StartTime is both of datatype TIME. I’d like to calculate the difference i minutes and seconds. Thankyou Fredrik

(TimeTo ÷ TimeFrom) / 60000 = <time in minutes,100-parts-seconds>

The Result of StopTime-StartTime is an integer which represrents the result in milliseconds. So a simple devide by 1000 gives the Differenz in seconds. one more dividing by 60 gives the result in minutes

Thankyou guys! Thats part of the solution… [;)] Is it possible that someone already have a smart function for calculating StopTime - StartTime and get the result in minutes and seconds? I would like to know the result in minutes AND seconds, not minutes OR seconds. [:)] But I just can’t figure how to do it. Fredrik

quote:

Originally posted by frgusto
Thankyou guys! Thats part of the solution… [;)] Is it possible that someone already have a smart function for calculating StopTime - StartTime and get the result in minutes and seconds? I would like to know the result in minutes AND seconds, not minutes OR seconds. [:)] But I just can’t figure how to do it. Fredrik

What about using two different receiving variables? Anna

``````
VAR t:TIME

BEGIN
t:=000000T+(TimeTo-TimeForm);
MESSAGE('%1',t);
END

``````

Hi Dalius short and nice !!