ClockGetTime

Calculates the time based on how many seconds have elapsed since 12:00 AM GMT on January 1, 1970 (taking into account the current time zone as specified on the local computer).

Function Group Execution Windows Embedded Thin Client
ClockGetTime Date & Time Synchronous Supported Supported Supported

Syntax

ClockGetTime( numSeconds )
numSeconds
The number of seconds elapsed since 12:00 AM GMT on January 1, 1970.

Returned value

Returns the time calculated in string format.

Examples

Tag Name Expression
Tag ClockGetTime( 0 ) // If the computer is in the Central time zone. Returned value = 18:00:00
Tag ClockGetTime( 1018886359 ) // If the computer is in the Central time zone. Returned value = 10:59:19
Note: This function takes into account the current Time Zone, as specified in the Control Panel of the local computer.
Tip: To convert the number of seconds strictly into the HH:MM:SS format, you must use the Format() function instead of the ClockGetTime() function.