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 -->
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.