DATE_AND_TIME into DATE
DT_TO_DATE converts a value of the data type DATE_AND_TIME into a value of the data type DATE.
Input
Output
All input and output variables used for programming this function have been declared in the POU header. The same POU header is used for all programming languages.
VAR
DT_value: DATE_AND_TIME:=DT#2011-12-24-18:29:59;
DATE_value: DATE:=D#2001-01-01;
END_VAR
BODY
WORKSPACE
NETWORK_LIST_TYPE := NWTYPELD ;
ACTIVE_NETWORK := 0 ;
END_WORKSPACE
NET_WORK
NETWORK_TYPE := NWTYPELD ;
NETWORK_LABEL := ;
NETWORK_TITLE := ;
NETWORK_HEIGHT := 5 ;
NETWORK_BODY
B(B_F,DT_TO_DATE!,Instance,18,1,26,3,,?D?C);
B(B_VARIN,,DT_value,16,1,18,3,);
B(B_VAROUT,,DATE_value,26,1,28,3,);
L(1,0,1,5);
END_NETWORK_BODY
END_NET_WORK
END_BODY
DATE_value := DT_TO_DATE(DT_value);