Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: NLS_DATE_FORMAT and Stored Proc
"swatir" <swatir_2003_at_yahoo.com> wrote in message
news:ea944b33.0411011400.37e96c9f_at_posting.google.com...
> Hi,
>
> I am sending a date time as a string to a stored proc. The stored proc
> compares this date time value to the date time value in a column in
> the DB. This comparison is failing due to the formats of the date
> time. The string I am sending in is of this format - "01/01/1976
> 12:30:00".
>
> I also have an entry in my .bashrc -
> export NLS_DATE_FORMAT="mm/dd/yyyy hh24:mi:ss".
>
> The stored proc however reads the date time value from the column in
> the oracle default format "DD-MON-YY" and fails on the comparison.
>
> Any help is appreciated.
Don't send a date in as a string, send it in as a date, convert the string
to a date explicitly using to_date(the string, the string format)
Jim
Received on Mon Nov 01 2004 - 20:44:14 CST
![]() |
![]() |