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: Simple Date/time question.

Re: Simple Date/time question.

From: Amine Y. Tarhini <atarhini_at_ringer.cs.utsa.edu>
Date: 1997/03/18
Message-ID: <5gm18o$5k4@ring01.cs.utsa.edu>#1/1

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'.
>
>These are only two of the many format models you can use for this purpose.
>Check you SQL or PL/SQL language reference books, where they're all listed.
>--
>Amine.
>atarhini_at_ringer.cs.utsa.edu
>
>The above views are mine only ... etc. etc.
-- 
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

Original text of this message

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