Execute: SELECT to_char(sysdate,’YYYY-MON-DD HH24:MI:SS’) FROM dual; Result: 2019-SEP-26 15:24:40 To extract the hour:: SELECT TO_CHAR(SYSDATE,’HH24′) AS CURRENT_HOUR FROM DUAL;
Execute: SELECT to_char(sysdate,’YYYY-MON-DD HH24:MI:SS’) FROM dual; Result: 2019-SEP-26 15:24:40 To extract the hour:: SELECT TO_CHAR(SYSDATE,’HH24′) AS CURRENT_HOUR FROM DUAL;