AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Datediff seconds oracle3/14/2023 You can then convert each of those components into milliseconds and add them up SQL> edġ select extract( day from diff )*24*60*60*1000 +Ĥ round(extract( second from diff )*1000) total_milliseconds You can use the EXTRACT function to extract the individual elements of an INTERVAL DAY TO SECOND SQL> edĥ from (select systimestamp - to_timestamp( '', 'yyyy-mm-dd' ) diff 1 select systimestamp - to_timestamp( '', 'yyyy-mm-dd' ) If the database is running on Unix, systimestamp will generally have microseconds. If the database is running on Windows, systimestamp will generally have milliseconds. When you subtract two variables of type TIMESTAMP, you get an INTERVAL DAY TO SECOND which includes a number of milliseconds and/or microseconds depending on the platform.
0 Comments
Read More
Leave a Reply. |