It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to convert interval to millis in SIL

I just need to provide the results in weeks only, so it is the opposite of millisToInterval(millis).

I need IntervalToMillis :)

3 answers

1 accepted

0 votes
Answer accepted


I have answered here,, I will write it here too:

You can get the interval as milliseconds by casting an interval to a number, like this:

interval i = "2h";

number n = (number)i; // holds 7.200.000

Usually, you will divide this number to 1000 * 3600 * 8 * 5 to get the number of weeks. Assuming 5 days / week, 8 h / day. We also have a round routine to pretty print the number, if necessary: The rest is up to you, you are free to do whatever you want with the number of weeks :)

Best Regards,


Silviu, thanks! It works and I was able to get the week on the field n.

The problem I am having now is that JIRA is not interpreting the results as "number" so it is not ordering the column in descending order or grouping issues when I want to use the two dimensional gadget.

Do I need to convert n to any other format to be able to do that? I rounded the results to 0 so I can see just the Weeks.... but the whole purpose of this was to group all the issues by the number of weeks.

Two dimenssional gadget interprets the result as None and pie chart as 0.0, so I am assuming that the issue is with the format ??


reindexing now to see if this fix the issue. Per Radu, Indexing is very important. If you want it number, you should select the correct indexer.

I am hopping to get a number as result and then convert it to Weeks

I want to show the remaining estimate and original estimate in hours only. How do I do that?

Check my answer, you will have to divide by 1000 * 3600.

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published yesterday in Confluence

Confluence CVEs and common questions

Two vulnerabilities have been published for Confluence Server and Data Center recently: March 20, 2019 CVE-2019-3395 / CVE-2019-3396 April 17, 2019 CVE-2019-3398 The goal of this article is...

45 views 0 9
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you