Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Current Date under Oracle
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
![]() |
![]() |