Examples
1. Get the date of the next/following Saturday from today
SELECT NEXT_DAY(SYSDATE, 'SAT') FROM dual;
2. Number of months between two dates
SELECT MONTHS_BETWEEN(actiondate, SYSDATE) FROM clientlicenses;
3. Returns date rounded to the unit specified by the format model. If you omit the format, the date is rounded to the nearest day
SELECT ROUND(TO_DATE('27-OCT-00'),'YEAR') as NEW_YEAR FROM dual;
No comments:
Post a Comment
Feel free to leave a comment