Calculate a time difference
PhraseExpander can calculate time differences.
This can be useful when you need to calculate the duration of a visit by entering the start time and the end time.
PhraseExpander will return the time difference in minutes (the returned value is always a positive number, so it doesn't matter which date you put first).


To calculate the difference between two time variables
- In the Quick Edit area, right-click where you want the calculated time difference to appear.
- Select Data → Calculate Expression.
- Right-click in the Type the math expression to calculate field and select Variables → Browse.
- Select the first time variable and click OK.
- Click after the variable in the Type the math expression to calculate field and type a minus sign (-).
- Right-click after the minus sign and select Variables → Browse.
- Select the second time variable and click OK.
- Click OK again to insert the calculation into the template.
When the template is executed, PhraseExpander subtracts the second time from the first and inserts the calculated difference.