5.4. Date Functions

Date functions operate on dates or return date values. Some of the functions return the current date and time, truncate a date/time value to a specific unit, or compute the number of months between two dates.

Many examples in the section use the TO_CHAR and TO_DATE functions. These date conversion functions accept date format strings as arguments. To keep the examples as simple to read as possible, I've assumed that the default date format is `dd-Mon-yyyy'. In some examples in which a different format is used (to include time, for example), the example begins with an ALTER SESSION command.

Get Oracle SQL: the Essential Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.