Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Default time not 12:00:00?
Apologies if this is a known issue.
What is the default time inserted to a date field, if you don't specify one? I would have assumed it was 12:00:00 (00:00:00 in 24-hour time), but look at this sequence of statements:
version: Oracle8i Release 8.1.6.1.0 - Production
SQL> create table date_test
2 (col1 int null, col2 date null);
Table created.
SQL> insert into date_test values (1,'17-Apr-03');
1 row created.
Commit complete.
SQL> select col1, to_char(col2,'mm-dd-yyyy hh:mm:ss') from date_test;
COL1 TO_CHAR(COL2,'MM-DD
--------- ------------------- 1 04-17-2003 12:04:00
SQL> 12:04:00?? I ran this again later and got 12:06:00 as the time entered on a different row. What is going on? The default time varies if you don't specify it?
Any insight would be appreciated.
Todd
Received on Thu Apr 17 2003 - 11:02:34 CDT
![]() |
![]() |