Hey Community!
I am attempting to calculate the difference between a date/time field and display how long it took in time (numeric field <- if this is the correct field type for the formula).
Example:
Field: "Incident Detect time" is 6/26/23 6:34:00 AM
Field: "Start time" is 6/26/2023 5:23 AM
Current formula in automation:
{{issue.customfield_13159.diff(issue.customfield_13462).days}}
But when using this formula it calculated 0, when I need it to be 6:34:00 AM - 5:23 AM = 1.11.
Should .days in the formula be something else?
Hi @Trevor Overstreet ,
Create MTTD field as a text type and then use the smart value in the automation - {{issue.customfield_13159.diff(issue.customfield_13462).days}} or {{issue.customfield_13159.diff(issue.customfield_13462).prettyPrint}}
Regards,
Mayuresh
Hey Mayuresh,
I recreated the field to be text and tried both formulas above with no luck. The .days still displayed 0. And .prettyPrint displayed "0 seconds".
Any ideas on how to get the difference to 1.11?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Actually the formula may be working (.prettyPrint). Continuing to test
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The calculation works and changed to {{issue.customfield_13159.diff(issue.customfield_13462).minutes}} to only show minutes. Thank you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Trevor Overstreet ,
Glad to know that it worked!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.