<?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: How to configure Splunk to parse a custom date timestamp in a column of a CSV file? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-Splunk-to-parse-a-custom-date-timestamp-in-a/m-p/229940#M44754</link>
    <description>&lt;P&gt;What &lt;CODE&gt;TIME_FORMAT&lt;/CODE&gt; strings have you tried?  Have you tried "%d-%b-%y %H.%M.%S.%6N %p"?&lt;/P&gt;</description>
    <pubDate>Tue, 03 May 2016 15:52:30 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2016-05-03T15:52:30Z</dc:date>
    <item>
      <title>How to configure Splunk to parse a custom date timestamp in a column of a CSV file?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-Splunk-to-parse-a-custom-date-timestamp-in-a/m-p/229939#M44753</link>
      <description>&lt;P&gt;I have a CSV file I need Splunk to consume every day that has a date time stamp in a column. I cannot figure out how to get Splunk to read the date time stamp properly since its Month is in all caps.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;01-JAN-09 07.21.53.656000 AM
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Any idea how to get this to work correctly? I do not see any options that fit this use case.&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 03 May 2016 15:31:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-Splunk-to-parse-a-custom-date-timestamp-in-a/m-p/229939#M44753</guid>
      <dc:creator>ebailey</dc:creator>
      <dc:date>2016-05-03T15:31:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure Splunk to parse a custom date timestamp in a column of a CSV file?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-Splunk-to-parse-a-custom-date-timestamp-in-a/m-p/229940#M44754</link>
      <description>&lt;P&gt;What &lt;CODE&gt;TIME_FORMAT&lt;/CODE&gt; strings have you tried?  Have you tried "%d-%b-%y %H.%M.%S.%6N %p"?&lt;/P&gt;</description>
      <pubDate>Tue, 03 May 2016 15:52:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-Splunk-to-parse-a-custom-date-timestamp-in-a/m-p/229940#M44754</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2016-05-03T15:52:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure Splunk to parse a custom date timestamp in a column of a CSV file?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-Splunk-to-parse-a-custom-date-timestamp-in-a/m-p/229941#M44755</link>
      <description>&lt;P&gt;Following time format should would work for you.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| gentimes start=-1 | eval _time=strptime("01-FEB-09 07.21.53.656000 AM","%d-%b-%y %H.%M.%S.%N %p") | table _time | append [| gentimes start=-1 | eval _time=strptime("07-FEB-09 07.21.53.656000 AM","%d-%b-%y %H.%M.%S.%N %p") | table _time] | append [| gentimes start=-1 | eval _time=strptime("21-MAR-09 07.21.53.656000 AM","%d-%b-%y %H.%M.%S.%N %p") | table _time]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Also, since the years is more than 6 years ago, you would've to set &lt;CODE&gt;MAX_DAYS_AGO&lt;/CODE&gt; in the sourcetype definition in props.conf to allow Splunk to parse this timestamp.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;MAX_DAYS_AGO = &amp;lt;integer&amp;gt;
* Specifies the maximum number of days past, from the current date, that an extracted date
  can be valid.
* For example, if MAX_DAYS_AGO = 10, Splunk ignores dates that are older than 10 days ago.
* Defaults to 2000 (days), maximum 10951.
* IMPORTANT: If your data is older than 2000 days, increase this setting.
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 03 May 2016 15:55:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-Splunk-to-parse-a-custom-date-timestamp-in-a/m-p/229941#M44755</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-05-03T15:55:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure Splunk to parse a custom date timestamp in a column of a CSV file?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-Splunk-to-parse-a-custom-date-timestamp-in-a/m-p/229942#M44756</link>
      <description>&lt;P&gt;I tried that with no luck - thanks&lt;/P&gt;</description>
      <pubDate>Tue, 03 May 2016 15:56:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-Splunk-to-parse-a-custom-date-timestamp-in-a/m-p/229942#M44756</guid>
      <dc:creator>ebailey</dc:creator>
      <dc:date>2016-05-03T15:56:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure Splunk to parse a custom date timestamp in a column of a CSV file?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-Splunk-to-parse-a-custom-date-timestamp-in-a/m-p/229943#M44757</link>
      <description>&lt;P&gt;The only issue I'm seeing, is that the sample it's too old. Using&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;MAX_DAYS_AGO=9999
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Makes Splunk auto identify the date correctly. Anyway you could use this props&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[  ]
CHARSET=UTF-8
MAX_DAYS_AGO=9999
SHOULD_LINEMERGE=true
disabled=false
TIME_FORMAT=%d-%b-%y %H.%M.%S.%6N
TIME_PREFIX=^
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And, as a last option you could use SEDCMD to replace the uppercase months to lower case if finally is needed&lt;/P&gt;

&lt;P&gt;With&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;SEDCMD-date = s/JAN/jan/g
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;For example&lt;/P&gt;</description>
      <pubDate>Tue, 03 May 2016 15:57:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-Splunk-to-parse-a-custom-date-timestamp-in-a/m-p/229943#M44757</guid>
      <dc:creator>gfuente</dc:creator>
      <dc:date>2016-05-03T15:57:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure Splunk to parse a custom date timestamp in a column of a CSV file?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-Splunk-to-parse-a-custom-date-timestamp-in-a/m-p/229944#M44758</link>
      <description>&lt;P&gt;This ended up being the solution combined with adding max_days_ago. Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 09:35:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-Splunk-to-parse-a-custom-date-timestamp-in-a/m-p/229944#M44758</guid>
      <dc:creator>ebailey</dc:creator>
      <dc:date>2020-09-29T09:35:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure Splunk to parse a custom date timestamp in a column of a CSV file?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-Splunk-to-parse-a-custom-date-timestamp-in-a/m-p/229945#M44759</link>
      <description>&lt;P&gt;Please accept the answer.&lt;/P&gt;</description>
      <pubDate>Wed, 04 May 2016 14:07:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-Splunk-to-parse-a-custom-date-timestamp-in-a/m-p/229945#M44759</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2016-05-04T14:07:27Z</dc:date>
    </item>
  </channel>
</rss>

