Title: RE: Re[4]: Date format element rule change

Jonathan,
You are right.
From FM:

For input format models, format items cannot appear twice,
and format items that represent similar information cannot be combined.
For example, you cannot use 'SYYYY' and 'BC' in the same format string.

And:

NLS_DATE_FORMAT specifies the default date format
to use with the TO_CHAR and TO_DATE functions.

Alex.


-----Original Message-----
From: Jonathan Gennick [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 12, 2002 1:21 PM
To: [EMAIL PROTECTED]
Cc: Alexander Feinstein
Subject: Re[4]: Date format element rule change


Alexander,

Your example below is very helpful, and explains why I
recalled that duplicating date elements was possible. I
probably used TO_CHAR to test this in the past, while the
other day I was using ALTER SESSION.

My theory on why you can't duplicate elements when setting
NLS_DATE_FORMAT is that the NLS_DATE_FORMAT value gets used
for both input AND output. It's no problem to spit the month
out twice in two different ways, but there's probably some
issues involved with making users specify the month
twice. For example, what if a user specifies two different
months, as in: Feb (03) 15, 2002?

This is becomming clearer to me now. Thanks.

Best regards,

Jonathan Gennick  
mailto:[EMAIL PROTECTED] * 906.387.1698
http://Gennick.com * http://MichiganWaterfalls.com * http://ValleySpur.com

Monday, February 11, 2002, 10:48:20 PM, you wrote:
AFmc> You can, using to_char, but not in "alter ... nls ..."
SQL>> select to_char(sysdate,'Mon (MM) DD, YYYY') from dual;
AFmc> TO_CHAR(SYSDATE,'
AFmc> -----------------
AFmc> Feb (02) 11, 2002
AFmc> 1 row selected.

AFmc> Alex.

Reply via email to