How to display date in a different format in oracle

前端 未结 4 1265
萌比男神i
萌比男神i 2020-12-18 22:04

I have a table with a date field. By default, select max(date) from table; returns the date in \'dd-mmm-yy\' format. How do I select the date in \'MM/DD/YYYY\'

4条回答
  •  不知归路
    2020-12-18 22:59

    Check out the to_char function and the date/time formats it accepts.

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

提交回复
热议问题