Converts the given date literal to a date value.

Syntax

TO_DATE ( date_literal )

Notes

  • The result is of type DATE.
  • Supply the date literal in any valid format.

Example

This example illustrates the TO_DATE function, returning all columns from rows in the orders table where the order_date column is earlier or equal to the date ‘12/31/2003':

SELECT *
    FROM orders
    WHERE order_date <= TO_DATE ('12/31/2003') ;

Compatibility

Progress extension