Date/Time Calculation
This macro calculates the number of days, weeks, months and years between two dates:
•Name - The unique name of the macro field. The field name cannot contain blanks or special characters. Two fields with the same name and of the same type are treated as one - the user input is only required once.
•Date/Time 1, 2 - Select down button to choose from available input variables or enter the date/time in any format. To use the current date/time, select "Now" or leave the input empty.
•Output - Set the the calculation output as minutes, hours, days, months or years,.
Select OK to insert a %DATETIME_Name% macro field into the command. Double-click on the field name to open the dialog and edit the macro properties again.
In the following example, the the patient's age will be inserted at the specified location.
Date of birth: %SELECT_DateOfBirth%.
The patient is %DATETIME_Age% years old.
DATETIME_Name field variables can also be used in the conditional statements, calculations or scripts.