Date and Time of Day Literals are used to indicate:
These types of literal are supported:
Type | Description |
---|---|
DATE | Defines a gregorian calendar date. |
TIME_OF_DAY | Defines a time of day. |
DATE_AND_TIME | Combines 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:
Type | Short Form | Long Form |
---|---|---|
DATE | D# | DATE# |
TIME_OF_DAY | TOD# | TIME_OF_DAY# |
DATE_AND_TIME | DT# | DATE_AND_TIME# |
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.
IEC 61131-3 Second Edition: Table 8 & Table 9.
IEC 61131-3 Third Edition: Table 9.
To learn about functions that operate on Date and Time values.
To learn about a function that returns the current date and time.
To learn about a function that returns the current date.
To learn about a function that returns the current time of day.
To learn about other language Common Elements.
For the meaning of terms used in Fernhill SCADA.