Date and Time of Day Literals

Help Contents


Date and Time of Day Literals are used to indicate:

These types of literal are supported:

DATEDefines a gregorian calendar date.
TIME_OF_DAYDefines a time of day.
DATE_AND_TIMECombines a DATE and TIME_OF_DAY to define a point in time.

The DATE, TIME_OF_DAY, and DATE_AND_TIME literals use these prefixes:

TypeShort FormLong Form

Examples of DATE literals:

D#2012-04-14 - 14th April 2012.

Date#2013-05-09 - 9th May 2013.

Examples of TIME_OF_DAY literals:

TOD#13:29:20.500 - 1:29 pm and 20.5 seconds.

Time_Of_Day#00:00:00 - Midnight.

Examples of DATE_AND_TIME literals:

DT#2013-05-09-13:29:20.500 - 1:29 pm and 20.5 seconds on 9th May 2013.

DATE_AND_TIME#2013-05-09-00:00:00 - Midnight on 14th April 2012.

Standards Compliance

Table 8 & 9 - IEC 61131-3 Second Edition.

Table 9 - IEC 61131-3 Third Edition.

Further Information

Date and Time Functions

To learn about functions that operate on Date and Time values.

Common Elements

To learn about other language Common Elements.


For the meaning of terms used in Fernhill SCADA.