to_date function with sysdate

前端 未结 3 2011
别跟我提以往
别跟我提以往 2020-12-21 03:44
select TO_CHAR(to_date(sysdate, \'DD-MON-YYYY\'), \'DAY\') FROM DUAL; 

When I run this query the output was : SUNDAY. But we know today is Tuesday(

3条回答
  •  甜味超标
    2020-12-21 04:21

    To_date is used to convert a strin to date. As sysdate is already a date, one must not add add to_date.

提交回复
热议问题