Trying to find epoch dates and convert them to dates
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!