Note: Technical Talk being moved to:
www.nazimcricket.com/wiki


Wednesday, 23 July 2008

Handy values for Oracle Date Functions

1 / 24 one hour 1 / 1440 one minute 1 / 86400 one second

One way to test the use of the above:

SQL>ALTER SESSION SET NLS_DATE_FORMAT='YYYY-MM-DD HH24:MI:SS';
SQL>SELECT SYSDATE FROM DUAL;
SQL>SELECT SYSDATE+1/86400 FROM DUAL;
SQL>SELECT SYSDATE+1/1440 FROM DUAL;
SQL>SELECT SYSDATE+1/24 FROM DUAL;

No comments: