Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,553,303
Community Members
 
Community Events
184
Community Groups

Want to convert Minutes in Days in structure

I wanted to convert 1 Hr 45 minutes to days so i followed below steps

1) i converted 1 hr 45 min in minutes by using below :-

WITH _originalestimateM = (originalestimate/60)/1000 -- it is giving me 105 which is correct

2) Now when i try to convert minutes into days which is as per formula divide by 1440 

WITH _originalestimateD = (_originalestimateM /1440)

it gives me 0 where as i wanted to decimal value which comes around 0.0729167 days

 

Is there a way to do it or any other way i can do it?

1 answer

1 accepted

1 vote
Answer accepted
Oday Rafeh
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.
Mar 20, 2023

@Sanjivani Wayal 

It seems like the division is being performed as an integer division, which discards the decimal part of the result. To ensure the result is displayed as a decimal value, you can cast the numerator or the denominator to a floating-point number (float) or a decimal number.

Updated formula:

WITH _originalestimateM = (originalestimate/60)/1000
WITH _originalestimateD = (CAST(_originalestimateM AS float) / 1440)

Regards 

Oday

WITH _originalestimateD = (CAST(_originalestimateM AS float)/1440) :

 

is giving me error of Invalid Expression in cloud JIRA

Oday Rafeh
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.
Mar 20, 2023

Jira Cloud Might not support the CAST function, we can try the 'ROUND' function instead


WITH _originalestimateD = ROUND(_originalestimateM / 1440.0, 7)

Above still gives me 0

Oday Rafeh
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.
Mar 20, 2023

Okay, You can try to calculate the decimal value directly within the same expression:

 

WITH _originalestimateD = ((originalestimate / 60.0) / 1000) / 1440

Hey it worked i used Markdown format Thank you so much for help :)

Like # people like this
Oday Rafeh
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.
Mar 20, 2023

Nice to hear that, 

Have a nice day 

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