Time (FPScript)

21.09.2021

Determines time of one or more calendar time values as a time span value or generates a time span value based on the specified elements.

Syntax

Time(CalendarTime)
or
Time(CalendarTime, Timezone)
or
Time(Hours, Minutes, Seconds)
or
Time(Days, Hours, Minutes, Seconds)

 

The syntax of the Time function consists of the following parts:

Part

Description

CalendarTime

The calendar time value from which the time is to be extracted. If the argument does not represent a valid calendar time value, then a void floating point value is output.

Permitted data structures are scalar value, data series und data matrix. All real data types are permitted, except time span. The argument is transformed to the unit s.

If the argument is a list, then the function is executed for each element of the list and the result is also a list.

Timezone

The time zone for which the result is to be determined, as a time shift from Coordinated Universal Time (UTC) in hours. If you omit the argument, the result is interpreted in local time.

Permitted data structures are scalar value. Supported data types are 16-bit integer, 32-bit integer, 64-bit integer, 32-bit floating point, 64-bit floating point und time span.

If the argument is a list, then the first element in the list is taken. If this is also a list, then the process is repeated.

Days

The number of days in the time span.

Permitted data structures are scalar value und data series. All real data types are permitted. The argument is transformed to the unit d.

If the argument is a list, then the first element in the list is taken. If this is also a list, then the process is repeated.

Hours

The number of hours in the time span.

Permitted data structures are scalar value und data series. All real data types are permitted. The argument is transformed to the unit h.

If the argument is a list, then the first element in the list is taken. If this is also a list, then the process is repeated.

Minutes

The number of minutes in the time span.

Permitted data structures are scalar value und data series. All real data types are permitted. The argument is transformed to the unit min.

If the argument is a list, then the first element in the list is taken. If this is also a list, then the process is repeated.

Seconds

The number of seconds in the time span.

Permitted data structures are scalar value und data series. All real data types are permitted. The argument is transformed to the unit s.

If the argument is a list, then the first element in the list is taken. If this is also a list, then the process is repeated.

Remarks

The data type of the result is always time span.

The structure of the result corresponds to that of the argument CalendarTime. The calculation is done element-by-element where appropriate.

Available in

FlexPro View, Basic, Professional, Developer Suite

Examples

Time('2.3.04 12:13:14')

Results in '12:13:14'.

Time(CurrentDate(), 0)

Returns the current time in Coordinated Universal Time.

Time(12, 30, 45.6)

Results in '12:30:45.6'.

Time(12, -30, 45.6)

Results in '11:30:45.6'.

-Time(12, 30, 45.6)

Results in -'12:30:45.6'.

Time(-12, -30, -45.6)

Results in -'12:30:45.6'.

Time(3, 12, 30, 45.6)

Results in '3:12:30:45.6'.

Time(3 d, 12 h, 30 min, 45 ms)

Results in '3:12:30:00.045'.

See Also

DateTime Function

Second Function

Minute Function

Hour Function

Day Function

Month Function

Year Function

WeekDay Function

DayOfYear Function

Date Function

Share article or send as email:

You might be interested in these articles