Chapter 12 Data conversion instructions
280 Rockwell Automation Publication 2080-RM001D-EN-E - February 2015
ANY_TO_DATE converts a value to a Date value.
Arguments
Parameter Parameter Type Data Type Description
EN Input BOOL Function enable.
When Enable = TRUE, execute the conversion to the Date computation.
When Enable = FALSE, there is no computation.
Applies only to LD programs.
i1 Input BOOL - SINT - USINT - BYTE -
INT - UINT - WORD - DINT -
UDINT - DWORD - LINT - ULINT
- LWORD - REAL - LREAL -
TIME - STRING
Any value other than Date.
o1 Output DATE Date represented by IN. A value of -1 indicates an invalid date.
ENO Output BOOL Enable out.
Applies only to LD programs.
ANY_TO_DATE operator ST language example
(* ST Equivalence: *)
ares := ANY_TO_DATE (1109110199); (* ares := d#2005-02-22 *)
rres := ANY_TO_DATE (1109110199.3); (*rres := d#2005-02-22 *)