Header Ads

Header ADS

Add 45 Second with SYSDATE in Oracle SQL

How to Add Second With Date on Oracle SQL

Topic Introduction: As usual if we add any number with a date the number will be considered as a day. here we will see how to add a second date. 

SELECT SYSDATE + 45 / 86400 "SYSDATE+45"
FROM DUAL;


Description: 
60 * 60 * 24= 86400 second. Here 86400 seconds = 1 day so 45 / 86400 day= 45 seconds.
If we add 45 / 86400 with any date it will be added 45 seconds.

To check detail run the query that shows sysdate,  sysdate + 45 seconds, and total second in one day.

SELECT SYSDATE, SYSDATE + 45 / 86400 "SYSDATE+45", 60 * 60 * 24 SEC_IN_ONEDAY
FROM DUAL;

No comments

Theme images by Deejpilot. Powered by Blogger.