Field Options and Settings
The Date Calculation Field article covers how to use the Field for various use cases. This article will highlight additional settings and configuration options for Date Calculation Fields.
Depending on the use case for your Fixed Date Calculation, you may want to display the outputs with negative days or convert the output of days only to show positive day values.
- For example, if you want to use a calculation to compare the
Due Dateand the
Completed Datefor a record, you should define how the output is displayed and communicated (as seen in the image below).
Use Case 1:
- If the
Completed Datewas January 4th, 2023, and the
Due DateJanuary 6th, 2023, the record was completed early, and the calculation will output 2 days.
Use Case 2:
- If the
Completed Datewas January 8th, 2023, but the
Due Datewas January 6th, 2023, the record was completed late. The calculation will output -2 days if your calculation is set to display negative values. However, this result might not communicate clearly to your end users that the record was two days overdue. As such, you may want to set your display settings to "Convert calculations with negative values to positive day values," depending on the purpose of your Field.
Calculation Label Ranges add color for interpretation and distinguish between negative and positive results. You can create Label Ranges for "Early" and " Late " records.
- Example: Here is what Label Ranges could look like for the Use Case examples above:
- Use Case 1 would output "2 days Early," and Use Case 2 would output "2 days Late."
For some Date Calculations, the resulting number of days will always be a positive value.
- For example,
Completed Date MINUS Created Datewill always yield a positive day value).
Because the value will always be positive, you may choose not to customize how the Date Calculation is displayed to end users by creating Label Ranges.
However, you will likely want to configure the display settings for Fixed Date Calculation Fields like you do for Standard Calculation Fields. These Labels can be configured precisely like Standard Calculations (learn how to set up labels here).
Date Calculation Complexities
Fixed Date Calculations are evaluated by counting 1 day elapsing at the passing of midnight rather than by measuring a full 24 hours. If you are familiar with Excel, dates are calculated the same way in Risk Cloud, where if two inputs are not on the same date, the output will be at least 1 day regardless of time.
- For example, if you calculate January 11th at 9:00 AM and January 12th at 5:00 PM, the output will be 1 day even though technically, there is less than a day between those times (16 hours). Since midnight has passed between the two dates, the calculation will result in 1 day.
Additionally, Fixed Date Calculations use the UTC time zone to determine the difference between two Date Fields. This could mean that the value of your Date Calculation may differ from what you expect.
- For example, if you compare January 10th at 9:00 PM CST to January 11th at 7:00 AM CST, the expected output is 1 day. However, because Risk Cloud calculates in UTC rather than the local time zone, the dates are converted to January 11th at 3:00 AM UTC and January 11th at 1:00 PM UTC, respectively.
Once converted to UTC, both dates are on January 11th, and thus the Date Calculation will output 0 days. UTC standardizes your Date Calculations across Risk Coud and your users. On any record, you can hover over the "Tooltip" icon next to the output of your Fixed Date Calculation to see what date inputs in UTC are being used to evaluate the calculation.
Please sign in to leave a comment.