TO_DSINTERVAL
TO_DSINTERVAL(string)
Section titled “TO_DSINTERVAL(string)”- string: This parameter is a varchar2 datatype that represents the interval to be converted. The format for the string is ‘DY day HH
Example
Section titled “Example”SELECT SYSTIMESTAMP + TO_DSINTERVAL('0 01:00:00.000') AS New_TimestampFROM dual;Output
Section titled “Output”NEW_TIMESTAMP--------------------------------------------------------------------------------08-MAR-22 03.50.45.123000 PM +00:00Explanation
Section titled “Explanation”The TO_DSINTERVAL function has been used to add 1 hour to the current system timestamp in this case. The string ‘0 01:00:00.000’ in the TO_DSINTERVAL function indicates ‘0 days, 1 hour, 0 minutes and 0 seconds’. The resultant timestamp is displayed under New_Timestamp.