<?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: Pb with sourcetype and date format in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Pb-with-sourcetype-and-date-format/m-p/210412#M41436</link>
    <description>&lt;P&gt;In the props.conf stanza for your sourcetype put:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;SEDCMD-timestamp=s/\d{2}\/\d{2}\/\d{4} \d{2}:\d{2} [A-Z]{3}\+\d{2}:\d{2}/\1\2\3/g
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This should convert the timestamp into &lt;CODE&gt;%m/%d/%Y %H:%S%Z&lt;/CODE&gt; format.&lt;/P&gt;</description>
    <pubDate>Wed, 03 Aug 2016 15:53:45 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2016-08-03T15:53:45Z</dc:date>
    <item>
      <title>Pb with sourcetype and date format</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Pb-with-sourcetype-and-date-format/m-p/210401#M41425</link>
      <description>&lt;P&gt;i have a file with field date like 03/08/2016 09:25 GMT+02:00&lt;/P&gt;

&lt;P&gt;My sourcetype doesn't work with &lt;BR /&gt;
%d/%m/%Y %H:%M %Z%z&lt;BR /&gt;
\d{2}/\d{2}/\d{4} \d{2}:\d{2} \d{2}:\d{2}&lt;/P&gt;

&lt;P&gt;I have Failed to parse timestamp. defaulting to file modtime&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2016 12:02:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Pb-with-sourcetype-and-date-format/m-p/210401#M41425</guid>
      <dc:creator>lefelle</dc:creator>
      <dc:date>2016-08-03T12:02:00Z</dc:date>
    </item>
    <item>
      <title>Re: Pb with sourcetype and date format</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Pb-with-sourcetype-and-date-format/m-p/210402#M41426</link>
      <description>&lt;P&gt;Do you have any control over how the field is written?  Splunk expects offsets in hhmm format rather than hh:mm.&lt;/P&gt;

&lt;P&gt;Also, the regex string in your question doesn't match the sample date.  Try &lt;CODE&gt;\d{2}\/\d{2}\/\d{4} \d{2}:\d{2} [A-Z]{3}\+\d{2}:\d{2}&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2016 12:59:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Pb-with-sourcetype-and-date-format/m-p/210402#M41426</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2016-08-03T12:59:17Z</dc:date>
    </item>
    <item>
      <title>Re: Pb with sourcetype and date format</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Pb-with-sourcetype-and-date-format/m-p/210403#M41427</link>
      <description>&lt;P&gt;it doens't work.&lt;BR /&gt;
the message is :&lt;BR /&gt;
could not use strptime to parse timestamp from ....&lt;BR /&gt;
failed to parse timestamp&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2016 13:20:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Pb-with-sourcetype-and-date-format/m-p/210403#M41427</guid>
      <dc:creator>lefelle</dc:creator>
      <dc:date>2016-08-03T13:20:13Z</dc:date>
    </item>
    <item>
      <title>Re: Pb with sourcetype and date format</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Pb-with-sourcetype-and-date-format/m-p/210404#M41428</link>
      <description>&lt;P&gt;One does not use regular expressions with &lt;CODE&gt;strptime&lt;/CODE&gt;.  I'm not sure what you're doing with it.  I just wanted to point out it doesn't match your data.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2016 13:31:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Pb-with-sourcetype-and-date-format/m-p/210404#M41428</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2016-08-03T13:31:51Z</dc:date>
    </item>
    <item>
      <title>Re: Pb with sourcetype and date format</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Pb-with-sourcetype-and-date-format/m-p/210405#M41429</link>
      <description>&lt;P&gt;In fact, i want to create a sourcetype to read my file. I selected Advance to define Format timestamp and Prefix timestamp. At this point, i have my parsing error.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2016 14:04:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Pb-with-sourcetype-and-date-format/m-p/210405#M41429</guid>
      <dc:creator>lefelle</dc:creator>
      <dc:date>2016-08-03T14:04:56Z</dc:date>
    </item>
    <item>
      <title>Re: Pb with sourcetype and date format</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Pb-with-sourcetype-and-date-format/m-p/210406#M41430</link>
      <description>&lt;P&gt;That's probably because of the odd timestamp format.  Do you have the ability to change it?&lt;BR /&gt;
I've never seen &lt;CODE&gt;%Z&lt;/CODE&gt; and &lt;CODE&gt;%z&lt;/CODE&gt; used together in a format string.  Have you tried &lt;CODE&gt;%d/%m/%Y %H:%M %Z&lt;/CODE&gt;?&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2016 14:08:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Pb-with-sourcetype-and-date-format/m-p/210406#M41430</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2016-08-03T14:08:35Z</dc:date>
    </item>
    <item>
      <title>Re: Pb with sourcetype and date format</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Pb-with-sourcetype-and-date-format/m-p/210407#M41431</link>
      <description>&lt;P&gt;Yes, i have.&lt;BR /&gt;
It doesn't work too.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2016 14:15:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Pb-with-sourcetype-and-date-format/m-p/210407#M41431</guid>
      <dc:creator>lefelle</dc:creator>
      <dc:date>2016-08-03T14:15:52Z</dc:date>
    </item>
    <item>
      <title>Re: Pb with sourcetype and date format</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Pb-with-sourcetype-and-date-format/m-p/210408#M41432</link>
      <description>&lt;P&gt;That brings us back to my first question, which hasn't been answered.&lt;/P&gt;

&lt;P&gt;Can the date format be changed?&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2016 15:06:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Pb-with-sourcetype-and-date-format/m-p/210408#M41432</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2016-08-03T15:06:07Z</dc:date>
    </item>
    <item>
      <title>Re: Pb with sourcetype and date format</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Pb-with-sourcetype-and-date-format/m-p/210409#M41433</link>
      <description>&lt;P&gt;I can't change the date format in the file. &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;BR /&gt;
This file is create by nother system and i'm not ability to change it.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2016 15:11:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Pb-with-sourcetype-and-date-format/m-p/210409#M41433</guid>
      <dc:creator>lefelle</dc:creator>
      <dc:date>2016-08-03T15:11:05Z</dc:date>
    </item>
    <item>
      <title>Re: Pb with sourcetype and date format</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Pb-with-sourcetype-and-date-format/m-p/210410#M41434</link>
      <description>&lt;P&gt;Then you may have to use SED within your props.conf file to change the field to a recognized format.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2016 15:14:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Pb-with-sourcetype-and-date-format/m-p/210410#M41434</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2016-08-03T15:14:30Z</dc:date>
    </item>
    <item>
      <title>Re: Pb with sourcetype and date format</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Pb-with-sourcetype-and-date-format/m-p/210411#M41435</link>
      <description>&lt;P&gt;how can do that ?&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2016 15:22:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Pb-with-sourcetype-and-date-format/m-p/210411#M41435</guid>
      <dc:creator>lefelle</dc:creator>
      <dc:date>2016-08-03T15:22:25Z</dc:date>
    </item>
    <item>
      <title>Re: Pb with sourcetype and date format</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Pb-with-sourcetype-and-date-format/m-p/210412#M41436</link>
      <description>&lt;P&gt;In the props.conf stanza for your sourcetype put:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;SEDCMD-timestamp=s/\d{2}\/\d{2}\/\d{4} \d{2}:\d{2} [A-Z]{3}\+\d{2}:\d{2}/\1\2\3/g
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This should convert the timestamp into &lt;CODE&gt;%m/%d/%Y %H:%S%Z&lt;/CODE&gt; format.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2016 15:53:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Pb-with-sourcetype-and-date-format/m-p/210412#M41436</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2016-08-03T15:53:45Z</dc:date>
    </item>
  </channel>
</rss>

