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

CONCAT_D_TOD

Function Name

CONCAT_D_TOD

Description

Combines a date input with a time of day input to provide a date time output.

Arguments

Input 1 {DATE}

Input 2 {TIME_OF_DAY}

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

Returns

Output {DATE_AND_TIME}

The output is the Date provided by Input 1 + the Time of Day provided by Input 2.

Example:

Function Block Diagram - CONCAT_D_TOD:

A CONCAT_D_TOD function has 2 inputs (in this case, the inputs are constants):

  • Input 1 defines 2006-03-11 as a Date value (D#)
  • Input 2 defines 10:10:00 as a Time of Day value (TOD#).

The CONCAT function concatenates the date value and time of day value. The result is a Date and Time output of 2006-03-11-10:10:00.000

ST Program - CONCAT_D_TOD:

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

  • Output := CONCAT_D_TOD (Input 1, Input 2)

Where Output, Input 1 and Input 2 are defined as variables earlier in the ST program. Each input is separated by a comma. Input 1 is a Date value, Input 2 is a Time of Day value and the Output is a Date and Time value.


ClearSCADA 2015 R2