How to get a date at midnight

前端 未结 2 1074
臣服心动
臣服心动 2021-01-19 10:42

I would like to know how to get a date with 00 hour, 00 minutes and 00 seconds.

This

select to_char(sysdate, \'dd/MM/YYYY HH:mm:ss\') from dual;
         


        
2条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-19 11:36

    mm should be replaced with mi for minutes:

    select to_char(to_date('03/05/2017', 'DD/MM/YYYY'), 'DD/MM/YYYY HH:mm:ss') from dual;
    

提交回复
热议问题