ANY_TO_DATE
The ANY_TO_DATE instruction converts a String, Integer, Real, or Time data type to a Date data type.
Boolean, Byte, and Word date types are supported but are not recommended.
Languages supported: Function block diagram, ladder diagram, structured text.
This instruction applies to the Micro810, L20E, L50E, and L70E controllers.
ANY_TO_DATE

Parameter | Parameter Type | Data Type | Description | |
---|---|---|---|---|
EN | Input | BOOL | When set to true, the instruction is enabled.
| |
i1 | Input | BOOL SINT USINT BYTE INT UINT WORD DINT UDINT | DWORD LINT ULINT LWORD REAL LREAL TIME STRING |
|
o1 | Output | DATE | Converted date value. Errors during conversion (such as a negative date) result in an INVALID result. | |
ENO | Output | BOOL | Enables output. Applies to ladder diagram programs. |
ANY_TO_DATE examples
ANY_TO_DATE function block diagram example

ANY_TO_DATE ladder diagram example

ANY_TO_DATE structured text example

Results

Provide Feedback