Description
Returns a formatted String representing the specified time interval.
Timing Precision Mode
This page describes functionality in millisecond timing precision mode. Millisecond timing precision mode is deprecated and will be removed in a future release. We recommend that you migrate your Mission Plans to nanosecond timing precision mode.
Method Signature
TimeUtilities.TimeIntervalToString(
|
Variable timeInterval,
|
|
String format)
|
Arguments
timeInterval
|
|
Description:
|
The time interval value that will be converted to a string format.
|
Units:
|
day
|
format
|
|
Description:
|
Specifies the format of the output String. The format specification can include the time formats shown in the "Parsing Dates and Times" reference in the Help File, including days, hours, minutes, and seconds.
|
Return Value
Returns a formatted String representing the specified time interval.
Syntax
myString1 = TimeTools.TimeIntervalToString(myVariable1, myString2);
|
In this example, the variable input time of 0.5 days is reported as a string interval in the specified format.
String strTimeInterval;
Variable varTimeInterval;
varTimeInterval = 0.5;
strTimeInterval = TimeTools.TimeIntervalToString(varTimeInterval,"hh:mm:ss");
Report strTimeInterval;
|
Output:
strTimeInterval = "12:00:00"
|
See also
TimeUtilities Object
TimeUtilities.TimeIntervalToString
Parsing Dates and Times
|