<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: work with a non-conventional timestamps in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/work-with-a-non-conventional-timestamps/m-p/98719#M20652</link>
    <description>&lt;P&gt;Hi, rgcurry,&lt;/P&gt;

&lt;P&gt;Thanks, so i will put this into the regex ? (not the timestamp strftime format)&lt;/P&gt;

&lt;P&gt;Thanks again!&lt;/P&gt;</description>
    <pubDate>Fri, 13 Jul 2012 21:19:44 GMT</pubDate>
    <dc:creator>bluecoder008</dc:creator>
    <dc:date>2012-07-13T21:19:44Z</dc:date>
    <item>
      <title>work with a non-conventional timestamps</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/work-with-a-non-conventional-timestamps/m-p/98717#M20650</link>
      <description>&lt;P&gt;Hi, I am working with some legacy logs that have spaces in timestamps, e.g.&lt;/P&gt;

&lt;P&gt;2012-07-12 06:00:05:  9 -07:00&lt;BR /&gt;
2012-07-12 06:00:06:259 -07:00&lt;BR /&gt;
2012-07-12 06:01:05: 45 -07:00&lt;/P&gt;

&lt;P&gt;is there a way for splunk to extract the timestamps as '2012-07-12 06:00:05:  9 -07:00' etc?&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jul 2012 19:03:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/work-with-a-non-conventional-timestamps/m-p/98717#M20650</guid>
      <dc:creator>bluecoder008</dc:creator>
      <dc:date>2012-07-13T19:03:04Z</dc:date>
    </item>
    <item>
      <title>Re: work with a non-conventional timestamps</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/work-with-a-non-conventional-timestamps/m-p/98718#M20651</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;

&lt;P&gt;\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2}:\s*(\d+)\s-\d{2}:\d{2}&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jul 2012 19:51:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/work-with-a-non-conventional-timestamps/m-p/98718#M20651</guid>
      <dc:creator>rgcurry</dc:creator>
      <dc:date>2012-07-13T19:51:26Z</dc:date>
    </item>
    <item>
      <title>Re: work with a non-conventional timestamps</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/work-with-a-non-conventional-timestamps/m-p/98719#M20652</link>
      <description>&lt;P&gt;Hi, rgcurry,&lt;/P&gt;

&lt;P&gt;Thanks, so i will put this into the regex ? (not the timestamp strftime format)&lt;/P&gt;

&lt;P&gt;Thanks again!&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jul 2012 21:19:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/work-with-a-non-conventional-timestamps/m-p/98719#M20652</guid>
      <dc:creator>bluecoder008</dc:creator>
      <dc:date>2012-07-13T21:19:44Z</dc:date>
    </item>
    <item>
      <title>Re: work with a non-conventional timestamps</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/work-with-a-non-conventional-timestamps/m-p/98720#M20653</link>
      <description>&lt;P&gt;hi, it doesnt work. also, dont we need slash \ in front of 'd' and 's' ?&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jul 2012 22:24:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/work-with-a-non-conventional-timestamps/m-p/98720#M20653</guid>
      <dc:creator>bluecoder008</dc:creator>
      <dc:date>2012-07-13T22:24:20Z</dc:date>
    </item>
    <item>
      <title>Re: work with a non-conventional timestamps</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/work-with-a-non-conventional-timestamps/m-p/98721#M20654</link>
      <description>&lt;P&gt;Yes, the slashes are needed, I did not notice that they got dropped when I pasted in my code sample. Something I still goof up on now and again on this site. It should work with the slashes included, I tested it and it worked for me just fine.&lt;/P&gt;

&lt;P&gt;Use this to create a field extraction. Test it first as follows:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype={your_sourcetype} | rex fields=_raw "(?P&amp;lt;eventDateTime&amp;gt;\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2}:\s*(\d+))"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then copy the code between the double-quote marks into the regex in Field Extractions to save it for your App.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jul 2012 22:48:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/work-with-a-non-conventional-timestamps/m-p/98721#M20654</guid>
      <dc:creator>rgcurry</dc:creator>
      <dc:date>2012-07-13T22:48:31Z</dc:date>
    </item>
  </channel>
</rss>

