「Oracle入門」TRUNC(日時)関数のサンプル
1.SELECT SYSDATE FROM DUAL;
2018/03/05 16:21:50
2.SELECT TRUNC(SYSDATE-1, 'MM’) FROM DUAL;
2018/03/01
SELECT TRUNC(SYSDATE-1, 'YYYY’) FROM DUAL;
2018/01/01
3.SELECT TRUNC(SYSDATE -1 ) FROM DUAL;
2018/03/04
Coding Changes the World
1.SELECT SYSDATE FROM DUAL;
2018/03/05 16:21:50
2.SELECT TRUNC(SYSDATE-1, 'MM’) FROM DUAL;
2018/03/01
SELECT TRUNC(SYSDATE-1, 'YYYY’) FROM DUAL;
2018/01/01
3.SELECT TRUNC(SYSDATE -1 ) FROM DUAL;
2018/03/04