Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How do I insert date/time into a ORACLE date field?????? - new to ORACLE
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>...Received on Wed Jan 22 1997 - 00:00:00 CST
> 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
>
![]() |
![]() |