Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: to_date and milliseconds

Re: to_date and milliseconds

From: Lucas Carvalho Teixeira <lucascarvalho_at_gmail.com>
Date: Wed, 04 Jul 2007 19:48:28 -0000
Message-ID: <1183578508.086492.100700@n60g2000hse.googlegroups.com>


On 4 jul, 15:56, "Ana C. Dent" <anaced..._at_hotmail.com> wrote:
> Lucas Carvalho Teixeira <lucascarva..._at_gmail.com> wrote innews:1183574567.465035.260160_at_g4g2000hsf.googlegroups.com:
>
>
>
> > Hello,
> > I am trying to convert a string to date.
>
> > INSERT INTO table VALUES (to_date('2007-01-11 14:46:28.035','yyyy-mm-
> > dd hh24:mi:ss.??'));
>
> > I was trying to use ms or ff3 where are the "??" and I am getting an
> > error:
> > ERROR at line 1:
> > ORA-01821: date format not recognized
>
> > I can not convert this date with milliseconds, but without
> > milliseconds works perfectly: to_date('2007-01-11 14:46:28','yyyy-mm-
> > dd hh24:mi:ss').
> > Any Idea?!
>
> > Thank you.
>
> Use TO_TIMESTAMP in place of TO_DATE

Thank you. Now It is working,
INSERT INTO table VALUES (to_timestamp('2007-01-11 14:46:28.035','yyyy- mm-
dd hh24:mi:ss.ff3')); Received on Wed Jul 04 2007 - 14:48:28 CDT

Original text of this message

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