Calculation Engine Date Time Functions
The following are functions for date/time conversion to be used in the OAS Calculation Engine:
Unix to DateTime
Returns a string of the date and time when passing in the number of seconds since 1970.
Parameters:
- Number of seconds since 1970
- String containing format codes
Examples:
UNIXTODATETIME([Tag.Value],"MM/dd/yyyy HH:mm:ss")
UNIXTODATETIME([Tag.Value],"yyyy/MM/dd")
String to Ticks
Returns a number of ticks given a date string and format used to parse the date.
Parameters:
- DateTime string
- String format matching the input DateTime
Examples:
STRINGTOTICKS([Tag.Value], "MM/dd/yyyy HH:mm:ss")
STRINGTOTICKS([Tag.Value], "yyyy/MM/dd")