I am calculating the difference betweehn the two timestamps in my code.
One at the beginning of the code and one in the intermediate step.
I am using the below code snippet to calculate the difference.
l_sumruntimeinsec := EXTRACT (DAY FROM (systimestamp - l_begintimestamp))*24*60*60+
EXTRACT (HOUR FROM (systimestamp - l_begintimestamp))*60*60+
EXTRACT (MINUTE FROM (systimestamp - l_begintimestamp))*60+
EXTRACT (SECOND FROM (systimestamp - l_begintimestamp));
First time stamp (l_begintimestamp) : 27-SEP-22 05.56.07.685582 AM
Second time stamp (systimestamp): 27-SEP-22 05.56.52.897170000 AM -07:00
Alot of microseconds is getting added in second timestamp.
The difference should have been around 46 seconds but it is showing 45045.211641.
Is there a way to trim the timestamp?