Hi,
I have a working formula in a Calculated Number Field custom field that calculates the minutes between a date and time field and the current date and time.
<!-- @@Formula: (issue.get("customfield_10202")==null ? null : (issue.get("customfield_10202").getTime() - (new Date()).getTime()) / 1000 ) -->
The very simple issue I have is that the result is displayed obviously as a negative value and I need it to be a positive value.
I have tried to reorder the same formula to subtract the date and time field from the current date and time but I get errors in the logs as I'm sure my formula is incorrect.
<!-- @@Formula: (new Date()).getTime()) / 1000 ) - (issue.get("customfield_10202")==null ? null : (issue.get("customfield_10202").getTime() -->
I've looked for examples and tweaked the formula but now run out of ideas.
Thanks.
With a bit more thought and testing I used the below formula to get what I needed. No errors in the log so it looks good.
<!-- @@Formula: (issue.get("customfield_10202")==null ? null : (new Date()).getTime()) / 1000 - issue.get("customfield_10202").getTime() / 1000 -->
Join us June 26, 11am PT for a webinar with Atlassian Champion Robert Hean & Loom’s Brittany Soinski. Hear tips, stories, and get your burning questions answered. Learn how Loom makes training and enablement easier. Don’t miss it!
Register todayOnline forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.