5 Replies Latest reply on Aug 18, 2009 8:32 AM by Hoek

    Convert dates to char using to_char()

      I understand this
      select to_char(sysdate,'MONTH') from dual;
      returns AUGUSTbbb (b are blank spaces)

      Can I pass any other arbitrary dates to that 1st parameter? Something like...
      select to_char('01-Dec-09','MONTH') from dual;
      I even tried other formats
      select to_char(01-Dec-09,'MONTH') from dual;
      select to_char('01-Dec-09','MON') from dual;
      but it gives ORA-01722: invalid number error. How can I pass arbitrary dates?