--12 Hour Format
SELECT TO_CHAR(SYSDATE,'HH12:MI:SS') FROM DUAL;
--24 Hour Format
SELECT TO_CHAR(SYSDATE,'HH24:MI:SS') FROM DUAL;
--Hour Format with AM/PM
SELECT TO_CHAR(SYSDATE,'HH12:MI:SS AM') FROM DUAL;
SELECT TO_CHAR(SYSDATE,'HH24:MI:SS AM') FROM DUAL;
The AM will indicates that either its morning time or
afternoon time automatically.
No comments:
Post a Comment