TimeSpan Operator (FPScript)

23.08.2021

Converts an expression into the time span data type.

Syntax

TimeSpan Expression

The syntax of the TimeSpan operator consists of the following elements:

Element

Description

Expression

Any expression. All data types are permitted.

Remarks

The operator can process scalar values or entire data series and data matrices. If Expression is a data series or a data matrix, then the type conversion takes place on a per-element basis and the result is once again a data series or a data matrix. If a signal, a signal series or a space curve is converted, only the Y component is examined. The result contains the converted Y component as a data series or data matrix. If Expression is a list, then the operation is executed for each item in the list and the result is also a list.

When converting a numerical value into a time span, this is interpreted as the length of the time span in seconds, including any possible fractional digits. The absolute value is formed for complex data types. When converting strings, the country-specific decimal character specified in FlexPro Options is used. The Empty type results in a void time span value.

If Expression is a quantity, then it has to have the SI dimension of Time and it will be transformed to the unit s before conversion.

Available in

FlexPro View, Basic, Professional, Developer Suite

Examples

TimeSpan 12345.6

Returns the time span '03:25:45.6'.

TimeSpan "12:13:14,56"

Returns '12:13:14.56'.

TimeSpan Empty

Returns '?:?:?'.

TimeSpan (12 h + 13 min + 14.56 s)

Returns '12:13:14.56'.

 

See Also

Data Types

ChangeDataType Function

Boolean Operator

Integer16 Operator

Integer32 Operator

Integer64 Operator

FloatingPoint32 Operator

FloatingPoint64 Operator

ComplexInteger16 Operator

ComplexInteger32 Operator

ComplexInteger64 Operator

ComplexFloatingPoint32 Operator

ComplexFloatingPoint64 Operator

String Operator

CalendarTime Operator

Share article or send as email:

You might be interested in these articles