NOW

Function Name

NOW

Description

Outputs the current date and time (taken from the server when the Logic program executes)

Arguments

None.

Returns

Output {DATE_AND_TIME}

For more information on the data types for the inputs and outputs, see Data Type Hierarchy.

Example:

Function Block Diagram - NOW:

A NOW function can be used as an input for other functions, for example, as an input for an ADD_DT_TIME function. The NOW function provides the current date and time.

ST Program - NOW:

The syntax for a NOW function in an ST Program is:

Output := NOW();

The NOW function can also be used in place of a Date and Time Input in an ST Program:

Output := ADD_DT_TIME (NOW, Input 2);

Where Output and Input 2 are defined as variables earlier in the ST program. The NOW function replaces Input 1 (it provides the current date and time for Input 1).


Disclaimer

Geo SCADA Expert 2022