Wednesday, June 23, 2010

Get Date & Time From System In Orcale

Get Date From System In Oracle
SELECT SYSDATE FROM DUAL;

Get Date From System In Oracle
SELECT TO_CHAR(SYSDATE,'YYYY MM DD') FROM DUAL;

Get Time From System In Oracle
SELECT TO_CHAR(SYSDATE,'HH MI SS') FROM DUAL;

Get Date From System with Heading In Oracle
SELECT TO_CHAR(SYSDATE,'YYYY MM DD') TODAY_DATE FROM DUAL;

Get Time From System with Heading In Oracle
SELECT TO_CHAR(SYSDATE,'HH MI SS') NOW_TIME FROM DUAL;

Get Time(24 Hours) From System with Heading In Oracle
SELECT TO_CHAR(SYSDATE,'HH24 MI SS') NOW_TIME FROM DUAL;

Get Time(12 Hours) From System with Heading In Oracle
SELECT TO_CHAR(SYSDATE,'HH MI SS') NOW_TIME FROM DUAL;

Get Date & Time(12 Hours) From System with Heading In Oracle
SELECT TO_CHAR(SYSDATE,'YYYY MM DD HH24 MI SS') DAT_TIME FROM DUAL;

No comments: