DATE_AND_TIME ConstantsΒΆ
You can combine DATE constants and TIME_OF_DAY constants into DATE_AND_TIME constants.
Syntax:
dt# <data and time declaration>
As an alternative, you can use the following styles of syntax instead of dt#: DT#, date_and_time, DATE_AND_TIME.
You must define the date and time declaration in the format <year-month-day-hour:minute:second>.
You can define seconds as real numbers or define fractions of a second.
CODESYS treats DATE_AND_TIME (DT) values internally just like DWORD. The time is given in seconds, beginning on 01 January 1970 at 00:00.
Examples:
DATE_AND_TIME#1996-05-06-15:36:30 dt#1972-03-29-00:00:00
See also