select to_char(sysdate, 'YYYY-MM-DD HH24:MI:SS') from dual; or select to_char(sysdate, 'YYYYMMDD') from dual;