Title: to_date function and NLS settings on client
Helmut,
 
The cleint nls_date setting can be done by
 
ALTER SESSION SET NLS_DATE_FORMAT = 'dd.mm.yyyy';
 
The currect setting can be seen from v$nls_parameters and if the session has explicitly set it, the new value will be shown.
 
However, I feel this problem more than that. Please note that the DATE datatype is not just date, but timestamp as well. Your query is comparing a date field to '01.10.1950', which means the 00:00:00 of 1st Oct 1950. Your data field could containt 13:30:31 of 1st Oct 1950. Therefore the comparison fails. Have you tried this:
 
select ... from ... where trunc(datefield1) = '01.10.1950'
 
or
 
select .. from .. where datefield1 between '01.10.1950' and '02.10.1950'
 
Hop this helps.
 
Arup Nanda
www.proligence.com
----- Original Message -----
Sent: Wednesday, November 20, 2002 8:03 AM
Subject: to_date function and NLS settings on client

Hello!

We have several Windows clients connecting to our db-server. Every client issues the statement:

select .... from thabe where date = to_date('01.10.1950','DD-MM-YYYY');

Some clients return the correct number of rows where as others return nothing.

I know that this has something to to with the NLS settings on the client.

How do I find out the NLS settings on the client? Just in the registry?

How coem this does not work although I explicity specify a format mask?

This is 8.1.7 on Solaris.

Thanks,
Helmut

Reply via email to