「Oracle」TRUNC(日付)のサンプルコード

サンプルコード
select trunc(sysdate) from dual –2017-5-18

select trunc(sysdate, 'mm’) from dual –2017-5-1

select trunc(sysdate,’yy’) from dual –2017-1-1

select trunc(sysdate,’dd’) from dual –2017-5-18

select trunc(sysdate,’yyyy’) from dual –2017-1-1

select trunc(sysdate,’d’) from dual –2017-5-13

select trunc(sysdate, 'hh’) from dual –2017-5-18 14:00:00

select trunc(sysdate, 'mi’) from dual –2017-5-18 14:41:00

DataBase

Posted by arkgame