Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Trying to find epoch dates and convert them to dates

NeedHelpDBAMar 15 2012 — edited Mar 16 2012
I'm trying to find every epoch time in a string and convert them to a date. I have tried the below with no luck.


SELECT REGEXP_REPLACE('1315617396271 Impacting: CISCO SAN SWITCH1315617396271 Impacting: CISCO SAN SWITCH'
,'([[:digit:]]{10,10})',unixts_to_date('\1'))
FROM dual

Result
Error - ORA-01722: invalid number

I know the dates are good and the function works fine from the below test.
select unixts_to_date('1315617396') from dual

result
10 September 2011 01:16:36 AM

Any help with this would be much appreciated!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 13 2012
Added on Mar 15 2012
12 comments
987 views