Interval Function can be use to achieve the functionality to add or subtract Sec/Min/our intervals in Date.
SELECT SYSDATE,
SYSDATE + (1 / (24 * 60 * 60)) "1Sec Addition",
sysdate + interval '1' second "1SecAddition Intervalfunc",
SYSDATE + (1 / (24 * 60)) "1Min Addition",
sysdate + interval '1' minute "1MinAddition Intervalfunc",
SYSDATE + (1 / 24) "1HR Addition",
sysdate + interval '1' hour "1hourAddition Intervalfunc"
FROM DUAL
No comments:
Post a Comment