Question : getting an format error using to_char function


Hi ,

 The requirement is I need to convert the date from  SYSDATE to Chinese date format i.e  'MM¿dd¿,yyyy¿'

When I fire the query
Select to_char(to_date('01-FEB-07','DD-MON-YY'),'MM¿dd¿,yyyy¿') from dual , I get the
ORA-01821: date format not recognized
01821. 00000 -  "date format not recognized"

kindly help me in this regard.





1  

Answer : getting an format error using to_char function

>>SYSDATE to Chinese date format

I assume you are wanting to display Chinese characters as output of the to_date call.

How Oracle display characters are typically based on the NLS parameters of the system and/or client.

That said, there are some NLS tricks you can do.

Try this from:
http://download.oracle.com/docs/cd/B25329_01/doc/appdev.102/b25108/xedev_global.htm

SELECT TO_CHAR(sysdate, 'DD/MON/YYYY',
   'NLS_DATE_LANGUAGE = ''Traditional Chinese'' ') from dual;
Random Solutions  
 
programming4us programming4us