Database   Sql   Functions   Packages   Performance   Books   Oracle   Other   About   XML   ORA-messages
  Sql date datatype


Oracle Regular Expressions
SQL Date format
String concatenation
Loop in pl/sql
SQL IN-clause
Regular Expressions Examples
Flashback query
Grant/revoke privileges
Rename tables, columns
Insert into Oracle
Database name
Table with sequenced numbers
Oracle connect by
Add columns to table


Oracle Date datatype

The DATE datatype in Oracle stores a date (and time) in a table.
Oracle uses its own internal format to store dates. Date data is stored in fixed-length fields of seven bytes each, corresponding to century, year, month, day, hour, minute, and second.

The default Oracle data format is DD-MON-YY, which looks like:'01-JAN-11'. More info on Oracle date formats is described here.

Besides a date also a time in stored. The accuracy of this time is seconds.
In Oracle 9i a new datatype called TIMESTAMP was introduced. See Oracle Timestamp datatype.
The TIMESTAMP datatype can also store part of a second.

You can add or substract days from a DATE datatype. For example sysdate+3 means the current day plus 3 days and sysdate +1/24 means the current day/time plus 1 hour.