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: SQL insert date ?

Re: SQL insert date ?

From: Bobby Slate <siclaro_at_dfw.net>
Date: Sun, 07 Jun 1998 01:22:57 -0500
Message-ID: <357A31C1.68E@dfw.net>


Unless your default date format matches the format of your date value, you will get an error. If you do a select on the info.currentdate, you'll probably notice it's not in the for format of '1998-06-19 17:00:00.0' so yes to need to use the TO_DATE mask.

Try :

TO_DATE ('1998-06-19 17:00:00','YYYY-MM-DD HH24:MM:SS') and your insert will probably work.

Scott Andrew Wehrmann wrote:
>
> If I have a table that is declared as,
>
> create table info (
> currentdate date
> )
>
> How do I insert a date that looks like '1998-06-19 17:00:00.0'? Do I
> have to use the to_date function, or is there a way I can just insert
> the date?
> I've tried insert into info values ('1998-06-19 17:00:00.0'), but it
> gives me an error. Thanks for any suggestions.
>
> -- Scott Wehrmann
Received on Sun Jun 07 1998 - 01:22:57 CDT

Original text of this message

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