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!

Hi,
I was not able to copy-and-paste your example due to unknown characters (which are displayed as squares on my Ubuntu laptop).
I modified them replacing those characters by spaces.
Maybe that won't totally fit your needs, or might behave differently on your system.
Anyway, I propose the following :Scott@my11g SQL>l
  1  with t as (
  2  select '1315617396  271 Impacting:  CISCO SAN SWITCH  1315617396  271 Impacting:  CISCO SAN SWITCH ' str from dual
  3  union all select '1315417396  123 Impacting:  CISCO SAN SWITCH  1315317396  123 Impacting:  CISCO SAN SWITCH ' from dual
  4  union all select 'I went to France from 1123456789 to 1234567890 and it was great !' from dual
  5  )
  6  ------ end of sample data ------
  7  select
  8       str
  9       ,listagg(strdt) within group (order by n) newstr
10  from (
11       select
12            str
13            ,n
14            ,regexp_replace(sstr,'(.*?)\d*$','\1') || (to_date('1970101','yyyymmdd') + regexp_substr(sstr,'\d{10}',1)/3600/24) strdt
15       from (
16            select
17                 str
18                 ,n
19                 ,regexp_substr(v.str,'.*?(\d{10}|$)',1,v.n) sstr
20            from (
21                 select t.str,
22                 m.column_value n
23                 from t
24                 ,table(cast(multiset(select level
25                                from dual
26                                connect by level <= regexp_count(t.str,'.*?\d{10}')+1) as sys.OdciNumberList)) m
27            ) v
28       )
29  )
30* group by str
Scott@my11g SQL>/
STR                                                NEWSTR
1315417396  123 Impacting:  CISCO SAN SWITCH  1315 06 June      2012 05:43:16 PM  123 Impacting:  CIS
317396  123 Impacting:  CISCO SAN SWITCH           CO SAN SWITCH  05 June      2012 01:56:36 PM  123
                                                   Impacting:  CISCO SAN SWITCH
1315617396  271 Impacting:  CISCO SAN SWITCH  1315 09 June      2012 01:16:36 AM  271 Impacting:  CIS
617396  271 Impacting:  CISCO SAN SWITCH           CO SAN SWITCH  09 June      2012 01:16:36 AM  271
                                                   Impacting:  CISCO SAN SWITCH
I went to France from 1123456789 to 1234567890 and I went to France from 07 May       2006 11:19:49 P
it was great !                                    M to 13 November  2009 11:31:30 PM and it was grea
                                                   t !

Similar Messages

  • I am trying to import movie files into to iMovie. They are home videos so I use handbrake and VLC to put them onto the computer and convert them to MPEG-4 files. I successfully imported two of the videos but the others are not working, they are all MPEG-4

    I am trying to import movie files into to iMovie. They are home videos so I use handbrake and VLC to put them onto the computer and convert them to MPEG-4 files. I successfully imported two of the videos but the others are not working, they are all MPEG-4 files. Now, they are not compatible. How to I get them into imovie?

    Hi
    I use
    • DV-PAL or DV-NTSC - or -
    • AIC
    Yours Bengt W

  • Have an older Macbook Pro 10.6.8 tried to update it to XMavericks. Discovered that my microsoft apps are not compatible. Can I keep my files and convert them?

    Have an older Macbook Pro 10.6.8 tried to update it to XMavericks. Discovered that my microsoft apps are not compatible. Can I keep my files and convert them?

    Use a product such as LibreOffice, the iWork applications, or Microsoft Office 2008 or newer to open them.
    (107914)

  • HT1550 I'm having trouble with importing them into iTunes and converting them at the same time. when i hold down option over the files i can't find where its supposed to say create new version. is this if you're in iTunes?

    I'm having trouble with importing them into iTunes and converting them at the same time. when i hold down option over the files i can't find where its supposed to say create new version. is this if you're in iTunes?

    You can't do it in one step. Add to iTunes first, Once the tracks are in iTunes you may convert to a different format.
    tt2

  • HT204053 Every time I try to access my emails on microsoft outlook I get a message from windows that mobileme services have stopped working. windows then tries to find a solution and says mobileme is not installed correctly. When I try to repair or uninst

    Every time I try to access my emails on microsoft outlook I get a message from windows that mobileme services have stopped working. windows then tries to find a solution and says mobileme is not installed correctly. When I try to repair or uninstall via the control panel my pc cannot find the route????? I do have an iphone and ipad. What can I do?

    The CrashIDs are what is needed. Do not attempt to attach or paste the reports.
    #Run Firefox in safe mode does that prevent crashes ?<br/>[[Troubleshoot Firefox issues using Safe Mode]]
    #Disable all plugins
    #Repeat and this time try in Windows safe mode. use the F8 key <br /> http://windows.microsoft.com/en-us/windows/start-computer-safe-mode#start-computer-safe-mode=windows-7
    So you are saying it works ok as long as you avoid certain pages such as this Forum. That makes me wonder if it could be malware that is blocking access to assistance.Run malwarescans with multipe and up-to-date tools.
    Sometimes a problem with Firefox may be a result of malware installed on your computer, that you may not be aware of.
    You can try these free programs to scan for malware, which work with your existing antivirus software:
    * [http://www.microsoft.com/security/scanner/default.aspx Microsoft Safety Scanner]
    * [http://www.malwarebytes.org/products/malwarebytes_free/ MalwareBytes' Anti-Malware]
    * [http://support.kaspersky.com/faq/?qid=208283363 TDSSKiller - AntiRootkit Utility]
    * [http://www.surfright.nl/en/hitmanpro/ Hitman Pro]
    * [http://www.eset.com/us/online-scanner/ ESET Online Scanner]
    [http://windows.microsoft.com/MSE Microsoft Security Essentials] is a good permanent antivirus for Windows 7/Vista/XP if you don't already have one.
    Further information can be found in the [[Troubleshoot Firefox issues caused by malware]] article.
    Did this fix your problems? Please report back to us!

  • I'm actually trying to find the date i visited a site. adding columns allow the order to be sorted but not show a date. Please tell me it there's a way to see t

    I'm actually trying to find the date i visited a site. adding columns allow the order to be sorted but not show a date. Please tell me it there's a way to see the date. the sidebar no longer has the option for date. the most recent only shows the time.

    If you only see the time then that would mean that you see an entry of the current day (today).
    History items from past days should have the date as well in the Most Recent Visit column.
    You should be able to see this changing if you open the last 7 days folder and scroll down.

  • Does Verizon not have a live chat option for customer service?  or a phone number?   I'm having a heck of a time trying to find how I can contact them

    Does Verizon not have a live chat option for customer service?  or a phone number?   I'm having a heck of a time trying to find how I can contact them

    As taken directly from the VerizonWireless website.
    (and I am not a chat or customer service agent, I just hang around here too much)
    CHAT:  Contact Us | Verizon Wireless
    Customer Service
    (800) 922-0204
    or dial *611 from your mobile phone
    View the *611 On-Screen App for Android Video
    6 AM - 11 PM, Mon - Sun

  • HT1349 I lost/had my iPhone stolen. Tried using Find My iPhone and it's offline. It was set up. What do I do now? Do I report it stolen? What is the best way in getting back my iPhone if any? Thank you in advance.

    Tried using Find My iPhone and it's offline. It (Find my iPhone) was set up. What do I do now? Do I report it stolen? What is the best way in getting back my iPhone if any? Thank you in advance.

    Find My iPhone is good for misplaced iPhone but not good for thief and it was never meant to be.
    You chance of getting it back is very small.
    There are a few things you can try.
    Try remote lock/wipe your iPhone through Find My iPhone.
    https://www.icloud.com
    You can report to the police, cell carrier (expensive cell charges for international calls, roaming etc)
    Change all the passwords used in iPhone: Apple ID, E-mail, Bank Account ....
    http://support.apple.com/kb/HT2526

  • My current os x is 10.9.5, using final cut express vers. 4.0.1.  I have imported .mov clips created with a older mac os x (lion) and converted them to import into fce. after doing this as well as putting clips on the fce timeline when playing back t.h

    My current os x is 10.9.5, using final cut express vers. 4.0.1.  I have imported .mov clips created on a older mac os x (lion) and when I wanted to import them into fce, a quicktime conversion window opened up and converted them (I haven't experienced this in the past). I then imported the converted quicktime clips into my fce project.  After doing this I took selected clips and put those edited clips on the fce timeline.  When playing the video back in the fce timeline,I noticed
    1) the video wasn't playing back smoothly like the original content
    2) when looking at the timecode reading of the timeline, the timecode was sputtering as well as the video and audio.  I exported to quicktime just to see if that was consistent, it was.
    When I play the converted quicktime content independently of fce,  it plays normally (no sputtering of timecode, video and audio.  Need help to resolve the sputtering playback of converted video content in the fce timeline.  I've never experienced this before.  Any suggestions?

    When you say you converted the clips before importing them into FCE, did you convert to AIC or DV and do the converted clips match your FCE Sequence settings exactly?  If not, go back and convert the original files again, using the intended Sequence settings as a guide.
    -DH

  • I am trying to export a pdf and convert to word and it is not allowing me to sign in

    I am trying to export a pdf and convert to word and it is not allowing me to sign in

    See this picture. I am trying to Sign in in the upper right hand corner and
    it just blinks it does not open up the sing in
    From: Sara.Forsberg
    Sent: Tuesday, January 20, 2015 11:35 AM
    To: Jennifer Casali
    Subject:  I am trying to export a pdf and
    convert to word and it is not allowing me to sign in
    I am trying to export a pdf and convert to word and it is not allowing me
    to sign in
    created by Sara.Forsberg
    <https://forums.adobe.com/people/Sara.Forsberg> in *Adobe
    Acrobat.com Services* - View the full discussion
    <https://forums.adobe.com/message/7114040#7114040>

  • SonicStage/Atrac3 files--How do I import these files and convert them??

    This is my problem.
    I used to have SonicStage, I no longer do, but I found some of my old CDs that I made using that program, but the atrac3 files(I believe that's what they're called) aren't compatible with Mac, so now what do I do? I've never converted anything in my life, are there any apps I could download that will rip the unreadable files from my old CDs and convert them into usable mp3 (or whatever) files?
    This is all very foreign to me and any advice would be greatly appreciated.

    Re: SonicStage for Mac

  • I am using OS 10.6.8 on my iMac and using Appleworks V 6. I can drag a document or spread sheet to pages V4.1 or numbers v 2.1 and convert them. If i upgrade to Mavericks can i continue to do this?

    I am using OS 10.6.8 on my iMac. I am also using Apple Works V 6, Pages V 4.1 and Numbers V 2.1.  I can drag a document or spreadsheet from Apple Works to Pages or Numbers icons on my doc and convert them to Pages or Numbets documents and spreadsheets.  If I upgrade my OS to Mavericks will I be able to continue these conversions?

    Thanks for your help.  Even though you can drag all documents or spreadsheets in an Appleworks folder at once to a Pages or Numbers icon on the Doc, you end up with all items as seperate Pages or Numbers documents or spreadsheets. Then you the have to move each one into new folder.  Is there a way to transform an entire Appleworks folder into a Pages or Numbers folder?  It would make for much less work.  Again, I appreciate your assistance.

  • The storage information shows i have 10 GB of movies which i don't how cab i finds these movies and delete them?.

    the storage information shows i have 10 GB of movies which i don’t how cab i finds these movies and delete them?.

    These others may do what you want:
    Disk Inventory X (FREE)
    WhatSize (SHAREWARE)
    GrandPerspective (FREE - donation)

  • Finding all of my existing WMA's and converting them to itunes

    When I launched itunes for the first time, it asked me if I wanted to find and convert existing audio files. I said yes, and the program located thousands of files and began converting wma's. I stopped it after a couple of hours, and everything that wasn't converted yet is now no longer showing up in queue in itunes. Is there a way to have itunes search my computer for these files and begin converting again, or do I now have to manually select every file I want to convert?

    You could try resetting your preferences files, but that may start iTunes converting all the .WMA files from the start. But it may not. Not sure.
    Resetting the iTunes Preference Files:
    -- Quit iTunes
    -- Delete C:\Documents and Settings\<your username>\Application Data\Apple Computer\iTunes\iTunes.pref
    -- Delete C:\Documents and Settings\<your username>\Local Settings\Application Data\Apple Computer Inc\iTunes.pref
    You may need to enable 'Show Hidden Files/Folders' in Windows Explorer==>Tools menu==>Folder Options==>’View’ tab before you can see the Application Data & Local Settings folders.
    This will force iTunes to run the setup assistance the next time you open it. You'll have to go back and re-set any preferences you want changed from the iTunes default. When you restart iTunes, it will perform its initial startup process. You can now let iTunes search for your music files.

  • I saved my aiff files to ext. storage.  Now how can I retrieve them and convert them to mp3 or wav files?

    I was trying to free up space on my internal storage, so when I created files in Garage Band, I thought it would be a great idea to store them in my external hard drive.  However, I now wanted to retrieve my files and burn them to a cd.  When I dragged and dropped them to iTunes, they showed up in my playlist, but when I tried to burn the playlist, I got a message telling me there were no files in the playlist.  Then I looked into putting them back into Garage Band and transferring from there to iTunes.  But do not know how to do this, or even if I can do this.  Do I have to always convert my aiff files to either wav or mpe files before I store them?  Is it a lost cause for me now?  Would really appreciate help on this.

    On the external drive, in the Finder, do a get Info on one of those & report size, where, etc.
    Also, if you double click on one, does iTunes play it?
    You could save some space without losing quality by converting them to Apple Lossless.

Maybe you are looking for

  • MIRO ITEM/PO TABS SUPRESSED

    Thanks in advance In my client in transaction MIRO in Item/Po overview,  PO reference, G/L account and material tabs are supressed. I want to retrieve the three tabs back. Kinldy let me know how to retrieve the tabs. Krishna

  • Namespace resolution in jsp:useBean

    If I define an object using <jsp:useBean id="name" scope="application"/>, how can I find it using jsp:useBean in another JSP, if possible?

  • Accessing pixels of an image

    is it possible to access the byte[] imageData of an javax.microedition.lcdui.Image Object? If not, what can i do to get the imageData of an image in PNG-Format?

  • FF opens 19 instances, but loses tabs

    Firefox is operating strangely. I recently updated to 5.0. Now, I use FF with several add-ons, including Too Many Tabs. When I closed FF last night, there were 5 tabs, plus a total of 31 tabs in 7 TMT toolbars. I closed FF normally. When I ran FF thi

  • By Products and Co Products

    Hello all, What is the meaning of by-products and co-products?? Pls ans. Thanks and Regards, Umakanth.