RealTime (Datalogger Clock Time)

The RealTime instruction is used to derive the year, month, day, hour, minute, second, microsecond, day of week, and day of year from the datalogger clock and store the results in an array.

Syntax

RealTime ( Dest )

Remarks

The RealTime instruction loads the destination array (Dest argument) with the current time values in the following order: (1) year, (2) month, (3) day of month, (4) hour of day, (5) minutes, (6) seconds, (7) microseconds, (8) day of week (1-7; Sunday = 1), and (9) day of year. The destination array must be dimensioned to 9. The time returned is the time of the datalogger's clock at the beginning of the scan in which the RealTime instruction occurs.

If RealTime is run within a scan, the time reflected by the instruction will be the time of the datalogger's clock when the scan was started. If RealTime is run outside of a scan (for instance, within a Do Loop), the time reflected by the instruction will be based on the system clock, which has a 10 msec resolution.

NOTE: TableName.Timestamp syntax can be used to return the timestamp of a data table record, expressed either as a time into an interval (for example seconds since 1970 or seconds since 1990) or as a date/time string. For more information, see TableName.TimeStamp (Table Timestamp).

Parameter

Dest (Destination)

The variable array in which to store the results of the RealTime instruction. The array must be dimensioned to 9 to include all of the current time values in the following order: (1) year, (2) month, (3) day of month, (4) hour of day, (5) minutes, (6) seconds, (7) microseconds, (8) day of week (1-7; Sunday = 1), and (9) day of year. The destination array must be dimensioned to 9. The time returned is the time of the datalogger's clock at the beginning of the scan in which the RealTime instruction occurs. Right-click the parameter to display a list of defined variables.

Type: Variable or Array