Conseguir resultado con decimales de restar dos fechas

Cesar
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 28, 2024

Buenas,

Tengo esta funcion:

{{now.diff(issue.Ultimo Cambio de Estado (Fecha)).businessDays.abs.format("%.2f%n")}}

Y no me devuelve el formato en decimales, por ejemplo tendria que ser 1.4 y me devuelve solo 1...

Ademas tambien he probado con format("#.##") y con el de los 0.00 y tampoco funciona...

Alguien sabe como puedo hacerlo?

Gracias de antemano!!

1 answer

0 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 28, 2024

Hi @Cesar -- Welcome to the Atlassian Community!

The businessDays unit of measure for differences is whole numbers only.  And, I believe it uses defined values for the working days and hours: it does not use any configuration settings for the project. https://support.atlassian.com/cloud-automation/docs/jira-smart-values-date-and-time/#Date-difference---

Finding the fractional business days is possible, although it is not simple and requires many assumptions.  It requires performing the math operations for the partial days, excluding weekends, etc.  If you want to see an explanation of doing this calculation, please see this post:

https://community.atlassian.com/t5/Automation-discussions/What-is-your-most-useful-automation-Here-is-mine/m-p/2612026#M523

Kind regards,
Bill

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events