Date/Time Arithmetic This will calculate the number of minutes that have elapsed between one date and time and another date and time. The following can be entered on the Program Spec: Date1: #1 Time1: #2 Date2: #3 Time2: >#4: GOTO #100 Difference of Days: #5 Difference of Mins: #6 Elapsed Minutes: #7 Dummy Program Field: <#100: #5 = #3 - #1; #6 = #4 - #2; #7 = @ABS(#5*1440 + #6); GOTO #1 The number of elapsed minutes can then be converted to days or hours using simple division. NOTE: The date fields must have the format type "D" and the time fields must have the type "H." The Difference of Days and Minutes as well as the Elapsed Minutes fields must be formatted as "N". The Dummy Program Field is a multi-line text field. Application: A fire department tracking each call could determine the length of each call using their time in and time out. The days are important if a call stretches across midnight. Employers could calculate pay for employees who work a swing/grave shift. Q & A Application Note Rev. 6/92 #2115 Page 1 of 1