Basic Oracle Concepts and Programming Question:
How To Write Date and Time Literals in Oracle?
Answer:
Date and time literals can coded as shown in the following samples:
SELECT DATE '2002-10-03' FROM DUAL -- ANSI date format
03-OCT-07
SELECT TIMESTAMP '0227-01-31 09:26:50.124' FROM DUAL
31-JAN-07 09.26.50.124000000 AM
-- This is ANSI format
SELECT DATE '2002-10-03' FROM DUAL -- ANSI date format
03-OCT-07
SELECT TIMESTAMP '0227-01-31 09:26:50.124' FROM DUAL
31-JAN-07 09.26.50.124000000 AM
-- This is ANSI format
Previous Question | Next Question |
How To Write Numeric Literals in Oracle? | How To Write Date and Time Interval Literals in Oracle? |