본문으로 바로가기

 

SELECT SUBSTR(TO_CHAR(TO_DATE(SYSDATE), 'YYYYMMDD'),1,4)||'년'||
SUBSTR(TO_CHAR(TO_DATE(SYSDATE), 'YYYYMMDD'),5,2)||'월'||
SUBSTR(TO_CHAR(TO_DATE(SYSDATE), 'YYYYMMDD'),7,2)||'일' AS TODAY FROM DUAL;
-- 출력 2020년03월03일​
SELECT TO_CHAR(SYSDATE, 'YYYY"년"MM"월"DD"일"' ) AS TODAY FROM DUAL;
-- 출력 2020년03월03일​
SELECT SYSDATE FROM DUAL;
-- 출력 20/03/03
SELECT TO_CHAR(SYSDATE, 'YYYYMMDD') FROM DUAL;
-- 출력 20200303