Custom Scripting for Hyperion

Application.msToTime Method

Converts a number into a time format.
[Application.]msToTime (milliseconds)

Arguments

milliseconds
Required. A number.



Return Value

The Application.msToTime method returns a time-formatted string (hh:mm:ss.0000).
If milliseconds is not a number, milliseconds is returned and an error message is written to the console.


Remarks

The following example uses msToTime to convert a number of milliseconds into a more readable format using time elements.

var swTracker = new Application.StopWatch();
ActiveDocument.Sections["Q-Contract Expenditures"].Process();
swTracker.stop();
Alert(msToTime(swTracker.elapsed));


Requirements