Skip to main content

TO_DATE

Deprecated version

This document refers to a deprecated version of the RQL programming language.

Please go here for documentation related to the latest supported version.

Parses a date from a string given a format, or to converts a long to a date. In the conversion from long to date the value will be interpreted as days since 1970-01-01 (Unix epoch).

Syntax
TO_DATE(<string>, <string>)
TO_DATE(<long>)

Example
TO_DATE("2018-02-01", "yyyy-MM-dd")
TO_DATE(0) // 1970-01-01
TO_DATE(1) // 1970-01-02
TO_DATE(18779) // 2021-06-01