Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Simple Date/time question.
In article <5gm106$5ig_at_ring01.cs.utsa.edu> atarhini_at_ringer.cs.utsa.edu (Amine Y. Tarhini) writes:
>In article <vBfzoAAn+WLzEwJv_at_force12.com> Force12 Solutions Ltd <Force12_at_force12.com> writes:
>>I understand you can have a combined date/time field in an Oracle
>>table. Is this true? If so, what format should the values be entered in?
>>I know the date goes in as '01-Jan-97'but I can't get a time to go in.
>>
>>Thanks in advance
>>
>>Hadi
>>--
>>Force12 Solutions Ltd
>
> INSERT INTO some_table (some_date_field) VALUES
> (TO_DATE('01-JAN-97 01:30:15 PM','DD-MON-YY HH:MI:SS AM'));
>
> or:
> INSERT INTO some_table (some_date_field) VALUES
> (TO_DATE('03/17/97 13:30:15','DD-MON-YY HH24:MI:SS'));
^^^^^^^^^Sorry, this should be 'MM/DD/YY'.
-- Amine. atarhini_at_ringer.cs.utsa.edu The above views are mine only ... etc. etc.Received on Tue Mar 18 1997 - 00:00:00 CST