Oracle Timestamp Difference in seconds

by on Dec.23, 2009, under Development

select (TO_NUMBER(TO_CHAR(EndDate,’J’))-TO_NUMBER(TO_CHAR(CreateDate,’J’)))*86400 + (TO_NUMBER(TO_CHAR(EndDate,’SSSSS’))-TO_NUMBER(TO_CHAR(CreateDate,’SSSSS’))) AS “Delta (sec)” from table1

Comments are closed.

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!


All entries, chronologically...