如:'01-12-2008'

解决方案 »

  1.   

    new java.util.Date()..getMonth()
    的值是3不是03,有点郁闷
      

  2.   

    SimpleDateFormat bf = new SimpleDateFormat("yyyy-MM-dd");
    bf.format(new Date);
      

  3.   


    +1SimpleDateFormat类可以实现
      

  4.   

    Oracle里,用TO_CHAR(date,'yyyy/mm/dd')大概是这个意思,我没环境,没测试
      

  5.   

    java.text.SimpleDateFormatSimpleDateFormat format=new SimpleDateFormat("dd-MM-YYYY");
    format.format(new Date());
      

  6.   

    sql?你从数据库里查出来转一下不就可以了么?
      

  7.   

    select to_char(sysdate, 'MM-DD-YYYY') from dual;
      

  8.   

    Msg 195, Level 15, State 10, Line 1
    'to_char' is not a recognized built-in function name.