Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Datatype
Hi Ken
> Is there an Oracle datatype of DATETIME? I can only find DATE in my
> documentation.
Oracle DATE datatypes have the time in them as well. Probably it is not being displayed by default on a SELECT because the NLS_DATE_FORMAT in your init<SID>.ora is set to the default.
To get times in and out of DATE datatypes investigate the TO_CHAR and
TO_DATE SQL functions. It should be in Chapter 4 or so of the Oracle 8.1.6
SQL reference manual. (see
http://www.oradoc.com/ora816/server.816/a76989/toc.htm) other Oracle
versions may vary slightly.
Here's an example: select to_char(sysdate,'DY DD MONTH YYYY HH24:MI:SS') from dual;
Regards
Dale
-- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Dale Edgar INET: dale_at_databee.com Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).Received on Tue Sep 25 2001 - 08:55:31 CDT