Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Current Date under Oracle

Re: Current Date under Oracle

From: Chris Webb <chris.webb_at_zoom.co.uk>
Date: Thu, 3 Feb 2000 16:01:09 -0000
Message-ID: <87c8k9$ce8$1@taliesin2.netcom.net.uk>


SYSDATE in an SQL will return the current Date.

so you could do the following:
INSERT INTO test SELECT SYSDATE FROM DUAL;

how the date will display depends on your date configuration, but it will store the date and time in the database. to get the time element back out use SELECT TO_CHAR(testdate, 'HH:MI:SS') FROM test;

HTH Chris...

Dirk Poppke wrote in message <87c5ld$bot$1_at_fbi-news.cs.uni-dortmund.de>...
>Hello!
>
>Stupid question:
>
>The standard SQL - Statement won't work under Oracle:
>
>create table test (testdate date);
>insert into test values (CURRENT_DATE);
>
>How can I get the current Date (and Time) and put it
>into a table?
>
>Thanks,
>Dirk
>
>
Received on Thu Feb 03 2000 - 10:01:09 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US