You are here: Start » Filter Reference » System » OPC UA » OPCUA_FormatDateTime
Module: | FoundationLite |
---|
Converts the OPC UA DateTime timestamp value to a readable formats
Name | Type | Range | Description | |
---|---|---|---|---|
inTimestamp | Long | OPC UA DateTime timestamp value | ||
inFormat | String | Date time format string | ||
outDateTimeString | String | Date time in textual format | ||
outDateTime | DateTime | Date time details structure |
Description
The OPC UA DateTime or UtcTime timestamp data types are representing the date and time point as a 64bit number of 100 nanosecond intervals since January 1, 1601. In the vision application those data types are represented by the internal Long type.
This filter allows to convert this timestamp counter into a more usable formats for purpose of handling or display, by taking the OPC UA DateTime value on the inTimestamp input and converting it to a DateTime structure on the outDateTime output and formatting a textual (display) representation on the outDateTimeString output.
The value on the inTimestamp input must not be negative.
The inFormat input specifies the format of the textual representation of the date and time to create on the outDateTimeString output. See the CurrentDateTime filter documentation for information about the syntax of the formatting string.
Please note that this filter does not have access to the timezone of the processed date and time. In particular, this filter does not know whether the source timestamp is in UTC or in the current (server) timezone, and it needs to be taken under consideration separately when working with the output of this filter.
Errors
This filter can throw an exception to report error. Read how to deal with errors in Error Handling.
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Timestamp year is out of valid range for formatting in OPCUA_FormatDateTime. |
Complexity Level
This filter is available on Basic Complexity Level.