Friday, December 08, 2017

Add Sec/Min/Hour Functionality in oracle


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

Clear BNE Cache for WebADI Changes

It Sometime happens that WebAdi Changes doesn't reflect once migrated in controlled instances. Here are the quick steps(Generally perfor...