Oracle SQL - Date Data type

Introduction

The basic data type for time-related data is DATE.

By default, date values are interpreted and displayed according to a standard date format.

Typically it shows only the day, the month, and the last two digits of the year.

You can change the default date format for your session or use conversion functions in your SQL commands.

Oracle stores dates in such a way that DATE column values are allowed from the year 4712 BC until the year 9999.

DATE type columns contain a time indication (hours, minutes, and seconds).

This may cause problems when comparing two dates. for example, seemingly equal dates could be different due to their invisible time components.

Oracle also supports the related data types TIMESTAMP with or without TIME ZONE and INTERVAL to store other time-related data in table columns.