hasrev.blogg.se

Datediff seconds oracle
Datediff seconds oracle







Simplest way to get the time difference is to obtain the date difference which is given in days and then multiply it by 24*60*60 to get the end results in seconds. INSERT INTO T1(T1_ID,CREATE_DATE_TIME,MOD_DATE_TIME) Create the following table and populate it with some data using the scripts shown below: Let’s see how we can get the difference between these two dates in seconds.Ĭonnect to SQL*Plus with proper authentication. Apart from other columns, we have two date columns in the table:Ĭreate_date_time gets populated when a record is created in the table for the first time and once the message is processed successfully, mod_date_time gets updated. We have to find out that how many seconds were taken for each message to get processed. It is a common requirement to do date arithmetic and to get difference between two date values.









Datediff seconds oracle