You are here: Core Reference > Coding > Logic > MAKE_DATE

MAKE_DATE

Function Name

MAKE_DATE

Description

Provides a date output that is made up from the components supplied via the inputs.

Arguments

Y {INT}

Y provides the year.

MO {INT}

MO provides the month.

D {INT}

D provides the day.

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

Returns

Output {DATE}

Example:

Function Block Diagram - MAKE_DATE:

The MAKE_DATE outputs a date value that is made up from the components supplied via its inputs (the year is taken from the Y input, month from the MO input, and the day from the D input). On a live system, the inputs for a MAKE_DATE function are often the results of a calculation, with the inputs being variable depending on the outputs of other functions etc.

ST Program - MAKE_DATE:

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

  • Output := MAKE_DATE (Y, MO, D);

Where Output, Y, MO, and D are defined as variables earlier in the ST program.

Alternatively, you can use the following syntax:

  • Output := MAKE_DATE (Y:= 2006, MO:= 02, D:= 14);

Where the numbers are the input values (in this case, they are the same numbers as used in the Function Block Diagram example above).


ClearSCADA 2015 R2