Home » SQL & PL/SQL » SQL & PL/SQL » date type
date type [message #1367] Wed, 24 April 2002 07:47 Go to next message
massa
Messages: 12
Registered: April 2002
Junior Member
I would like to know what is the exact format of the date type, because I would like to know if it is possible to put the hour in the date or if we only have the day, the month and the year.
If it is not possible, how can I manage to put the hour in my table?
Thanks
Christophe
Re: date type [message #1369 is a reply to message #1367] Wed, 24 April 2002 07:55 Go to previous messageGo to next message
motiram
Messages: 21
Registered: January 2001
Junior Member
Date is stored in YY-MON-DD format in Oracle. But though it shows only YYMONDD, it has time also stored in DB. So if you compare 02-APR-24 with another 02-APR-24 which is stored with a different time, it never matches.

Cheers.
Re: date type [message #1372 is a reply to message #1367] Wed, 24 April 2002 08:02 Go to previous messageGo to next message
massa
Messages: 12
Registered: April 2002
Junior Member
Do you know how it is possible to save a date with its time because I would like to copy a date column to another date column.
Re: date type [message #1374 is a reply to message #1367] Wed, 24 April 2002 08:05 Go to previous message
Joe
Messages: 138
Registered: November 1999
Senior Member
Massa,

The display format of the data datatype is based upon the nls_date_format parameter in you init.ora. If you want to change the way this is displayed, simply alter the nls_date_format in sqlplus:

sqlplus> alter session
set nls_date_format='YYYY-MM-DD HH:MI:SS';

Hope that helps.
Previous Topic: sql script
Next Topic: How do I switch databases in Personal Edition
Goto Forum:
  


Current Time: Fri Mar 29 00:23:43 CDT 2024