<?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 TIME_FORMAT, it's May, not January in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/TIME-FORMAT-it-s-May-not-January/m-p/92957#M19337</link>
    <description>&lt;P&gt;Overnight I noticed that my Splunk was suspiciously empty for a specific CSV file which was read in daily.&lt;/P&gt;

&lt;P&gt;Upon further investigation it turned out this was due to the fact that the file now has data for May 1, or, 01/05/2011....the CSV auto-parsing saw the format for the last half of last month and worked out, properly, that it was Day/Month/Year, (16/04/2011 was pretty obvious) but now, well, it's a bit fuzzier.&lt;/P&gt;

&lt;P&gt;Reading up in the manuals, it looks like the answer is to set the TIME_FORMAT in props.conf, which I have done with:&lt;/P&gt;

&lt;PRE&gt;
[source::/A/B/C/data/MyFile*]
TIME_FORMAT = %d/%m/%y %H:%M
&lt;/PRE&gt;

&lt;P&gt;The source is already being indexed with a inputs.conf entry for "/A/B/C/data"&lt;/P&gt;

&lt;P&gt;The data looks like:&lt;/P&gt;

&lt;PRE&gt;
3812305781230123    , 7773213          , 9099, B, 75, INTERNET, 01/05/2011 23:58
&lt;/PRE&gt;

&lt;P&gt;However, Splunk is still seeing this as data for January.&lt;/P&gt;

&lt;P&gt;What should I do to fix this?&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Mon, 02 May 2011 00:02:10 GMT</pubDate>
    <dc:creator>howyagoin</dc:creator>
    <dc:date>2011-05-02T00:02:10Z</dc:date>
    <item>
      <title>TIME_FORMAT, it's May, not January</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/TIME-FORMAT-it-s-May-not-January/m-p/92957#M19337</link>
      <description>&lt;P&gt;Overnight I noticed that my Splunk was suspiciously empty for a specific CSV file which was read in daily.&lt;/P&gt;

&lt;P&gt;Upon further investigation it turned out this was due to the fact that the file now has data for May 1, or, 01/05/2011....the CSV auto-parsing saw the format for the last half of last month and worked out, properly, that it was Day/Month/Year, (16/04/2011 was pretty obvious) but now, well, it's a bit fuzzier.&lt;/P&gt;

&lt;P&gt;Reading up in the manuals, it looks like the answer is to set the TIME_FORMAT in props.conf, which I have done with:&lt;/P&gt;

&lt;PRE&gt;
[source::/A/B/C/data/MyFile*]
TIME_FORMAT = %d/%m/%y %H:%M
&lt;/PRE&gt;

&lt;P&gt;The source is already being indexed with a inputs.conf entry for "/A/B/C/data"&lt;/P&gt;

&lt;P&gt;The data looks like:&lt;/P&gt;

&lt;PRE&gt;
3812305781230123    , 7773213          , 9099, B, 75, INTERNET, 01/05/2011 23:58
&lt;/PRE&gt;

&lt;P&gt;However, Splunk is still seeing this as data for January.&lt;/P&gt;

&lt;P&gt;What should I do to fix this?&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 02 May 2011 00:02:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/TIME-FORMAT-it-s-May-not-January/m-p/92957#M19337</guid>
      <dc:creator>howyagoin</dc:creator>
      <dc:date>2011-05-02T00:02:10Z</dc:date>
    </item>
    <item>
      <title>Re: TIME_FORMAT, it's May, not January</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/TIME-FORMAT-it-s-May-not-January/m-p/92958#M19338</link>
      <description>&lt;P&gt;Hi, I think you should use %Y instead of %y , because the year is "2011" (four digits).&lt;BR /&gt;
and , if possible, you can use TIME_PREFIX to tell splunk where is the exact date field you want splunk to recognize.&lt;/P&gt;</description>
      <pubDate>Mon, 02 May 2011 02:12:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/TIME-FORMAT-it-s-May-not-January/m-p/92958#M19338</guid>
      <dc:creator>dmlee</dc:creator>
      <dc:date>2011-05-02T02:12:26Z</dc:date>
    </item>
    <item>
      <title>Re: TIME_FORMAT, it's May, not January</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/TIME-FORMAT-it-s-May-not-January/m-p/92959#M19339</link>
      <description>&lt;P&gt;Hah, thanks, great catch on the %Y.  That didn't actually fix my issue, but, the TIME_PREFIX seems to get me closer.  There are six fields, comma separated, before my date/time field, so I just need to work out the regex on this -- as some of the fields are empty sometimes, othertimes not (annoying).&lt;/P&gt;</description>
      <pubDate>Mon, 02 May 2011 03:40:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/TIME-FORMAT-it-s-May-not-January/m-p/92959#M19339</guid>
      <dc:creator>howyagoin</dc:creator>
      <dc:date>2011-05-02T03:40:44Z</dc:date>
    </item>
    <item>
      <title>Re: TIME_FORMAT, it's May, not January</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/TIME-FORMAT-it-s-May-not-January/m-p/92960#M19340</link>
      <description>&lt;P&gt;For the benefit of those reading who may want a concrete example:&lt;BR /&gt;
&lt;PRE&gt;&lt;BR /&gt;
TIME_PREFIX = ^(?:[^\,]+,){6}\s*&lt;BR /&gt;
TIME_FORMAT = %d/%m/%Y %H:%M&lt;BR /&gt;
&lt;/PRE&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 09:31:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/TIME-FORMAT-it-s-May-not-January/m-p/92960#M19340</guid>
      <dc:creator>howyagoin</dc:creator>
      <dc:date>2020-09-28T09:31:02Z</dc:date>
    </item>
  </channel>
</rss>

