DT_TO_DATE
Function Name |
DT_TO_DATE |
---|---|
Description |
Converts a Date and Time input into a Date output (the output will not include a time). |
Arguments |
Input 1 {DATE_AND_TIME} For more information on the data types for the inputs and outputs, see Data Type Hierarchy. |
Returns |
Output {DATE} The output is the result of Input 1 - the Time supplied by Input 1. |
Example:
Function Block Diagram - DT_TO_DATE:
A DT_TO_DATE function has an input of NOW. This sets the input to be the current date and time. The DT_TO_DATE function returns the date part of the input as its output.
ST Program - DT_TO_DATE:
The syntax for a DT_TO_DATE function in an ST Program is:
- Output := DT_TO_DATE (Input 1)
Where Output is a Date value and Input 1 is a Date and Time value.