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: How do I insert date/time into a ORACLE date field?????? - new to ORACLE

Re: How do I insert date/time into a ORACLE date field?????? - new to ORACLE

From: Vijay Vardhineni <vardhineni_at_worldnet.att.net>
Date: 1997/01/22
Message-ID: <01bc0814$e0758ea0$2e6893cf@default>#1/1

you need to use TO_DATE function in your insert statement. Here is an example for inserting '1-JAN-97 12:45:43' in your table.

insert into fi_test(create_date) values (to_date('1-JAN-97 12:45:43', 'DD-MON-YY HH:MI:SS'));

-- 
Vijaya Kumar Vardhineni
Certified Oracle DBA, EDS
Plano, TX

Glynn Smith <glynn_at_fullnet.net> wrote in article
<01bc0762$e2f49340$666167ce_at_glynn-home>...

> All,
> First of all, thanks for any help in advance. I am new to ORACLE and
> trying to store date/time information in a date field. I need help in
> doing the following:
>
> insert into fi_test(create_date) values ( x );
>
> where x is what I need help in formating. I have tried the following for
> x:
>
> '1/20/1997 12:34:23'
> '12-23-1996 1:435:34'
> '1-JAN-97 12:45:43'
>
> Again any help would be appreciated greatly!!!
>
>
> Glynn Smith
> glynn_at_fullnet.net
>
Received on Wed Jan 22 1997 - 00:00:00 CST

Original text of this message

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