TimeSpan Operator (FPScript)
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
ComplexFloatingPoint32 Operator