TimeUtilities.ParseTimeInterval(String, String, Variable) Method

Top 

Description

Parses the input String for a time interval and returns the interval value in the units specified by the outputUnits argument.

 

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.

Click here to see the documentation for this object in nanosecond timing precision mode.

 

Method Signature

TimeUtilities.ParseTimeInterval(

String timeInterval,


String format,


Variable outputUnits)

 

 

Arguments

timeInterval


Description:

The String to parse for a time interval.

 

 

format


Description:

Specifies the format of the input 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.

 

 

outputUnits


Description:

The units in which to output the numeric time interval.

Valid Values:

Value

Label

0

Days

1

Hours

2

Minutes

3

Seconds

4

Milliseconds

 

 

 

 

Return Value

Type:

number

Units:

day

 

 

Returns the time interval as a numeric value.

 

Syntax

myVariable1 = TimeTools.ParseTimeInterval(myString1, myString2, myVariable2);

 

 

See also

TimeUtilities Object

TimeUtilities.ParseTimeInterval

Parsing Dates and Times