Define a Duration Expression
A Duration expression calculates the amount of time between two dates (example: The number of hours it takes to close an Incident).
To define a Duration expression:
- Create an expression.
- In the Editor drop-down list, select Duration.
The Duration Expression section opens. - Define the expression:
- Select a time period:
CSM applies Duration expressions against a 24/7 time period by default; however, the expressions can also be applied against existing Business Hours or new Business Hours (use the Business Hours Manager to create impromptu expressions).- Start Date/Time: Select a date/time field or calendar date/time to use as the starting point of the duration (example: Incident.Created Date Time).
This option is disabled when you select the Time Remaining check box because the expression automatically uses the current time to perform the calculation.
- End Date/Time: Select a date/time field or calendar date/time to use as the ending point of the duration (example: Incident.Closed Date Time).
- Units: Select the unit of time for which you want to display the duration (example: Days).
This option is disabled when you select the Time Remaining check box.
- Time Remaining: Select this check box to calculate the time remaining in the duration calculation expression.
This calculates from the current date/time to the end time.
- Largest Unit: Select the largest unit of time for which you want to display the duration (example: Hours).
This option isn't available until you select the Time Remaining check box.
- Smallest Unit: Select the smallest unit of time for which you want to display the duration (example: Seconds).
This option isn't available until you select the Time Remaining check box.
- Round: Select this check box to round the unit to the nearest whole number (example: January 1st to February 10th returns a value of one month instead of 1.37 months).
- Start Date/Time: Select a date/time field or calendar date/time to use as the starting point of the duration (example: Incident.Created Date Time).
- Select a calendar type from the Calendar Type drop-down list:
- 24/7: Expression is applied 24/7.
The 24/7 calendar option is applied by default.
- Working Hours: Expression is only applied during the selected Business Hours (example: Maintenance window) or value (example: SLA.Work Hours).
Option Description Working hours calendar - Select an option from the drop-down list.
- Select the ellipsis to choose the Business Hours.
Based on scope and value Expression makes a selection based on a specified scope and token value. - Select the scope from the drop-down list.
- Select the Token Selector to open the token menu, and then select a token that holds the appropriate name or ID.
- 24/7: Expression is applied 24/7.
- Select a time period:
- Select Save.