Summary
Creates a DATE_AND_TIME string using the entered date and time, then stores it in the specified address.
You can use Write to DATE_AND_TIME type if you register a device/PLC tag.
Format
SetDT (Device address, DATE_AND_TIME string)
Device address: DATE_AND_TIME tag
DATE_AND_TIME string: fixed string (preview only)
Year: numerical value (Range: 1970 to 8191)
Month: numerical value (Range: 1 to 12)
Day: numerical value (Range: 1 to 31)
Hours: numerical value (Range: 0 to 23)
Minutes: numerical value (Range: 0 to 59)
Seconds: numerical value (Range: 0 to 59)
10 milliseconds: numerical value (Range: 0 to 99)
Example expression:
SetDT("[w:[PLC1]TagName]","1970-01-02-03:04:05.06")
In the above example, write "02.01.70" to DATE_AND_TIME type device "[w:[PLC1]TagName]".
When the value for the
10 milliseconds field is 0, it is not output as part of the DATE_AND_TIME
string.
For example, 1970-01-02-03:04:05