Variable.ToTimeSpan(String) Method

Top 

Description

Converts the value of the Variable to a TimeSpan using the specified units. The level of precision of the conversion to the TimeSpan is a function of the underlying units of the data stored in the Variable.

 

Timing Precision Mode

This page describes functionality in nanosecond timing precision mode.

 

Method Signature

Variable.ToTimeSpan(

String units)

 

 

Arguments

units


Description:

The units to use during conversion.

Valid Values:

Value

Label

"day"

days

"hr"

hours

"min"

minutes

"s"

seconds

 

 

 

 

Return Value

Type:

timespan

Units:

day

 

 

Returns a TimeSpan object that contains the value of the variable in the specified units.

 

Syntax

myTimeSpan1 = myVariable1.ToTimeSpan(myString1);

 

 

See also

Variable Object

Matrix, Array, and Variable Math Guide