05-23-2023 01:48 PM
One of my team discovered that formatDuration() has a maximum input value of 2147483 resulting in an output of "24d 20:31:23". Is this a bug?
Solved! Go to Solution.
05-23-2023 01:55 PM
We are still testing. It seems there is an error on the testing side with our data.
05-24-2023 10:23 AM
So, it turns out that the issue was with using int() vs. long() in the internal conversion of a millisecond calculation.
The documentation is not clear for formatDuration(). It states that it takes an int value. It should also state that it can take a long value as using that conversion function results in the proper result.
05-24-2023 10:28 AM
@marcpaige we can make that update - just need to clarify with you here first. Are you saying that you found it to take a long() and it did generate results albeit them incorrect?
05-24-2023 11:33 AM
Using formatDuration(long((calculated double value)) returns a correct result.
When using the int() conversion function it returns the max value of INT format.