Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: strange date insertion
"Andre" <avanrossem_at_hotmail.com> wrote in message
news:4d32d1be.0403292103.2dac564c_at_posting.google.com...
> "Jim Kennedy" <kennedy-downwithspammersfamily_at_attbi.net> wrote in message
news:<4tV9c.30430$JO3.28991_at_attbi_s04>...
> > "Andre" <avanrossem_at_hotmail.com> wrote in message
> > news:4d32d1be.0403290414.1f94c80a_at_posting.google.com...
> > > Hello all,
> > >
> > > I have a problem:
> > >
> > > If i put in the following value in an oracle date-field:
> > > 01-01-29 then oracle converts it to 01-01-2029
> > >
> > > But If i insert 01-01-30 then oracle converts it to 01-01-1930
> > >
> > > Is this normal? Where can I change it?
> > >
> > > regards,
> > > Anneke
> > use the to_date function to make sure you translate strings to dates
> > correctly. eg to_date('01-01-20029','mm-dd-yyyy')
> > Jim
>
> My NLS-date-format is DD-MON-RR. I am using a to_date but this is with
> 2 numbers for the year. And i think i MUST use 4. I discovered this
> issue when I was editing a date-cell in the enterprise manager.
>
> Thanks all for the replies,
>
> regards,
> Anneke
> The netherlands
Don't rely on the nls date format. What if it changes? The to_date is much
more reliable.
Jim
Received on Mon Mar 29 2004 - 23:31:36 CST