to_char中的第三个参数怎么把中文日期转换为英文
也就是to_char第三个参数怎么设置

解决方案 »

  1.   

    to_char函数有第三个参数吗?没用过
      

  2.   

    SQL> select to_char(sysdate, 'yyyy-mon-dd', 'nls_date_language=american') from d
    ual;TO_CHAR(SYSDAT
    --------------
    2008-dec-15
      

  3.   

    我可以让年和月变成英文的,至于‘日’我暂时还不知道,等待楼下的答案,(*^__^*)...select to_char(sysdate, 'year-month-day', 'nls_date_language=american') from dual;---结果------
    two thousand eight-december -tuesday 
      

  4.   

    SQL> select to_char(sysdate, 'ddspth-mon-year', 'nls_date_language=American') fr
    om dual;TO_CHAR(SYSDATE,'DDSPTH-MON-YEAR','NLS_DATE_LANGUAGE=AMERICAN')
    ----------------------------------------------------------------
    sixteenth-dec-two thousand eight
    这样的日期看着多不方便啊,好奇楼主的需求
      

  5.   

    select to_char(sysdate, 'year-month-day', 'nls_date_language=american') from dual;
    这个很厉害。
      

  6.   

    Syntax
    to_char_date::= 
    Text description of to_char_date
    Purpose
    TO_CHAR (datetime) converts date of DATE, TIMESTAMP, TIMESTAMP WITH TIME ZONE, or TIMESTAMP WITH LOCAL TIME ZONE datatype to a value of VARCHAR2 datatype in the format specified by the date format fmt. If you omit fmt, then date is converted to a VARCHAR2 value as follows:DATE is converted to a value in the default date format. 
    TIMESTAMP and TIMESTAMP WITH LOCAL TIME ZONE are converted to values in the default timestamp format. 
    TIMESTAMP WITH TIME ZONE is converted to a value in the default timestamp with time zone format. 
    The 'nlsparams' specifies the language in which month and day names and abbreviations are returned. This argument can have this form:'NLS_DATE_LANGUAGE = language' 
      

  7.   

    SQL> select to_char(sysdate,'year-month-ddspth','nls_date_language=american') from dual;
     
    TO_CHAR(SYSDATE,'YEAR-MONTH-DD
    -----------------------------------------------------------------------
    two thousand eight-december -seventeenth
      

  8.   

    SQL> select to_char(sysdate,'year-mon-dy','nls_date_language=American') from dual;
     
    TO_CHAR(SYSDATE,'YEAR-MON-DY',
    --------------------------------------------------------
    two thousand eight-dec-wed