LDATE

64-bit calendar date value.

Note

This feature requires IEC 61131-3 Edition 3. Use --dialect iec61131-3-ed3 to enable it. See Enabling Dialects and Features for details.

Size

64 bits (day resolution)

Default

LDATE#1970-01-01

Range

LDATE#1970-01-01 to LDATE#9999-12-31

IEC 61131-3

Section 2.3.1 (Edition 3)

Support

Supported (Edition 3)

A date is stored as a count of seconds since 1970-01-01. LDATE counts them in 64 bits, so it reaches far past the 2106 ceiling a 32-bit DATE has; a literal outside LDATE#1970-01-01 to LDATE#9999-12-31 is reported as P2038.

An LDATE accepts a DATE# literal, which widens, but a DATE does not accept an LDATE# one — that narrows, and is reported as P4022.

Literals

LDATE#2024-01-15
LDATE#2024-12-31

Example

today := LDATE#2024-06-15;
launch := LDATE#2024-01-01;
is_after := today > launch;  (* is_after = TRUE *)

See Also