GetISOTSfromTS
(System Library)
Description: | Convert a VTScada timestamp to the ISO 8601 date and time format. |
Returns: | An ISO8601 Timestamp formatted string |
Usage: ![]() |
Script or steady state. |
Function Groups: | Time and Date |
Related to: | GetTSfromISOTS |
Format: ![]() |
GetISOTSfromTS(Timestamp[, IsUTC]) |
Parameters: |
Timestamp |
(Required) A VTScada timestamp (e.g. 482188850) |
IsUTC |
(Optional) Boolean value. If TRUE (Default) the timezone is UTC. If FALSE, then the timezone is local. |
Comments: |
VTScada uses UTC-based timestamps stored as seconds since midnight, January 1st, 1970. (ex 482188850) ISO 8601-style timestamps follow the format, YYYY-MM-DDThh:mm:ss (ex. 1985-04-12T23:20:50.52) If the timezone is local (IsUTC = FALSE), the input timestamp is first converted to UTC and then formatted as ISO8601. This ensures that, regardless of the input timezone, the output is always a UTC ISO8601 string. |
Example:
\System.GetISOTSfromTS(482188850)