<?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: CSV date being replaced/not parsed correctly in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/CSV-date-being-replaced-not-parsed-correctly/m-p/490746#M83877</link>
    <description>&lt;P&gt;So this happens when using the default csv sourcetype as well as a custom one. Here's the custom one:&lt;/P&gt;

&lt;P&gt;BREAK_ONLY_BEFORE_DATE = &lt;BR /&gt;
DATETIME_CONFIG = &lt;BR /&gt;
INDEXED_EXTRACTIONS = csv&lt;BR /&gt;
KV_MODE = none&lt;BR /&gt;
LINE_BREAKER = ([\r\n]+)&lt;BR /&gt;
NO_BINARY_CHECK = true&lt;BR /&gt;
SHOULD_LINEMERGE = false&lt;BR /&gt;
TIME_FORMAT = %Y-%m-%d %H:%M:%S&lt;BR /&gt;
category = Structured&lt;BR /&gt;
description = Comma-separated value format. Set header and other settings in "Delimited Settings"&lt;BR /&gt;
disabled = false&lt;BR /&gt;
pulldown_type = true&lt;/P&gt;</description>
    <pubDate>Wed, 30 Sep 2020 05:18:10 GMT</pubDate>
    <dc:creator>jaware_splunk</dc:creator>
    <dc:date>2020-09-30T05:18:10Z</dc:date>
    <item>
      <title>CSV date being replaced/not parsed correctly</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/CSV-date-being-replaced-not-parsed-correctly/m-p/490744#M83875</link>
      <description>&lt;P&gt;Let's say I have a CSV with the following spanning 10 years:&lt;/P&gt;

&lt;P&gt;Date | Time | Value&lt;BR /&gt;
2020-05-01  4:00:00 PM  49.88&lt;/P&gt;

&lt;P&gt;If I try to do a timechart it works fine for the last several years but if I select All Time then it incorrectly parses the timestamp and groups multiple days worth of values in a single day:&lt;/P&gt;

&lt;P&gt;_time | values(Close)&lt;BR /&gt;
2014-11-12  | 1.86&lt;BR /&gt;
1.87&lt;BR /&gt;
1.88&lt;BR /&gt;
1.92&lt;/P&gt;

&lt;P&gt;If I view the events, the parsed timestamp is incorrect now, but only for really old events:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Time (Splunk parsed):&lt;/STRONG&gt; 11/12/14 4:00:00.000 PM&lt;BR /&gt;&lt;BR /&gt;
&lt;STRONG&gt;Full Event:&lt;/STRONG&gt; 2010-05-04,4:00:00 PM,8.68,46458590,9.08,9.08,8.54&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Time (Splunk parsed):&lt;/STRONG&gt; 11/12/14 4:00:00.000 PM&lt;BR /&gt;&lt;BR /&gt;
&lt;STRONG&gt;Full Event:&lt;/STRONG&gt; 2010-05-26,4:00:00 PM,8.22,37479000,8.39,8.59,8.18&lt;/P&gt;

&lt;P&gt;I did this with the built-in CSV sourcetype as well as custom. Thanks for any help!&lt;/P&gt;

&lt;P&gt;EDIT: Here's an example. Download the Max dataset from here: &lt;A href="https://www.nasdaq.com/market-activity/stocks/amd/historical"&gt;https://www.nasdaq.com/market-activity/stocks/amd/historical&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Note it doesn't have the timestamp, so a new column was added with 16:00:00 (end of market close) called Time.&lt;/P&gt;

&lt;P&gt;I used the default CSV sourcetype as a test and same issue.&lt;/P&gt;

&lt;P&gt;Test search (All time):&lt;/P&gt;

&lt;P&gt;source="filename.csv" index="test" &lt;BR /&gt;
| timechart values("Close/Last") span=1d&lt;/P&gt;

&lt;P&gt;Around 2014 starts mis-parsing (Statistics tab -&amp;gt; click on date -&amp;gt; view events -&amp;gt; _time is different than the event date).&lt;/P&gt;</description>
      <pubDate>Mon, 04 May 2020 15:23:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/CSV-date-being-replaced-not-parsed-correctly/m-p/490744#M83875</guid>
      <dc:creator>jaware_splunk</dc:creator>
      <dc:date>2020-05-04T15:23:32Z</dc:date>
    </item>
    <item>
      <title>Re: CSV date being replaced/not parsed correctly</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/CSV-date-being-replaced-not-parsed-correctly/m-p/490745#M83876</link>
      <description>&lt;P&gt;What props.conf settings did you specify for the sourcetype?&lt;/P&gt;</description>
      <pubDate>Mon, 04 May 2020 15:36:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/CSV-date-being-replaced-not-parsed-correctly/m-p/490745#M83876</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-05-04T15:36:16Z</dc:date>
    </item>
    <item>
      <title>Re: CSV date being replaced/not parsed correctly</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/CSV-date-being-replaced-not-parsed-correctly/m-p/490746#M83877</link>
      <description>&lt;P&gt;So this happens when using the default csv sourcetype as well as a custom one. Here's the custom one:&lt;/P&gt;

&lt;P&gt;BREAK_ONLY_BEFORE_DATE = &lt;BR /&gt;
DATETIME_CONFIG = &lt;BR /&gt;
INDEXED_EXTRACTIONS = csv&lt;BR /&gt;
KV_MODE = none&lt;BR /&gt;
LINE_BREAKER = ([\r\n]+)&lt;BR /&gt;
NO_BINARY_CHECK = true&lt;BR /&gt;
SHOULD_LINEMERGE = false&lt;BR /&gt;
TIME_FORMAT = %Y-%m-%d %H:%M:%S&lt;BR /&gt;
category = Structured&lt;BR /&gt;
description = Comma-separated value format. Set header and other settings in "Delimited Settings"&lt;BR /&gt;
disabled = false&lt;BR /&gt;
pulldown_type = true&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 05:18:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/CSV-date-being-replaced-not-parsed-correctly/m-p/490746#M83877</guid>
      <dc:creator>jaware_splunk</dc:creator>
      <dc:date>2020-09-30T05:18:10Z</dc:date>
    </item>
    <item>
      <title>Re: CSV date being replaced/not parsed correctly</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/CSV-date-being-replaced-not-parsed-correctly/m-p/490747#M83878</link>
      <description>&lt;P&gt;yours:&lt;BR /&gt;
&lt;CODE&gt;TIME_FORMAT = %Y-%m-%d %H:%M:%S&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;but&lt;BR /&gt;
&lt;CODE&gt;2010-05-26,4:00:00 PM&lt;/CODE&gt; is &lt;CODE&gt;%Y-%m-%d,%H:%M:%S %p&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;and your setting is &lt;CODE&gt;INDEXED_EXTRACTIONS = csv&lt;/CODE&gt;&lt;BR /&gt;
try &lt;CODE&gt;TIMESTAMP_FIELDS&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/Admin/Propsconf"&gt;props.conf&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 04 May 2020 18:41:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/CSV-date-being-replaced-not-parsed-correctly/m-p/490747#M83878</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-05-04T18:41:39Z</dc:date>
    </item>
    <item>
      <title>Re: CSV date being replaced/not parsed correctly</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/CSV-date-being-replaced-not-parsed-correctly/m-p/490748#M83879</link>
      <description>&lt;P&gt;Same result. It parses from Nov 2014 - today properly. But for some reason prior to Nov 2014 it doesn't.&lt;/P&gt;</description>
      <pubDate>Mon, 04 May 2020 18:58:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/CSV-date-being-replaced-not-parsed-correctly/m-p/490748#M83879</guid>
      <dc:creator>jaware_splunk</dc:creator>
      <dc:date>2020-05-04T18:58:22Z</dc:date>
    </item>
    <item>
      <title>Re: CSV date being replaced/not parsed correctly</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/CSV-date-being-replaced-not-parsed-correctly/m-p/490749#M83880</link>
      <description>&lt;P&gt;The &lt;CODE&gt;TIME_FORMAT&lt;/CODE&gt; setting does not match the sample data.  It should be &lt;CODE&gt;%Y-%m-%d %I:%M:%S %p&lt;/CODE&gt;.  Also, add the &lt;CODE&gt;TIMESTAMP_FIELDS&lt;/CODE&gt; attribute.  Set &lt;CODE&gt;MAX_DAYS_AGO = 4000&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 04 May 2020 19:11:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/CSV-date-being-replaced-not-parsed-correctly/m-p/490749#M83880</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-05-04T19:11:35Z</dc:date>
    </item>
    <item>
      <title>Re: CSV date being replaced/not parsed correctly</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/CSV-date-being-replaced-not-parsed-correctly/m-p/490750#M83881</link>
      <description>&lt;P&gt;&lt;A href="https://wiki.splunk.com/Deploy:BucketRotationAndRetention"&gt;https://wiki.splunk.com/Deploy:BucketRotationAndRetention&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;These are too old for index, I guess.&lt;/P&gt;</description>
      <pubDate>Mon, 04 May 2020 19:35:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/CSV-date-being-replaced-not-parsed-correctly/m-p/490750#M83881</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-05-04T19:35:25Z</dc:date>
    </item>
    <item>
      <title>Re: CSV date being replaced/not parsed correctly</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/CSV-date-being-replaced-not-parsed-correctly/m-p/490751#M83882</link>
      <description>&lt;P&gt;Here's an example. Download the Max dataset from here: &lt;A href="https://www.nasdaq.com/market-activity/stocks/amd/historical"&gt;https://www.nasdaq.com/market-activity/stocks/amd/historical&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Note it doesn't have the timestamp, so a new column was added with 16:00:00 (end of market close) called Time.&lt;/P&gt;

&lt;P&gt;I used the default CSV sourcetype as a test and same issue.&lt;/P&gt;

&lt;P&gt;Test search (All time):&lt;/P&gt;

&lt;P&gt;source="filename.csv" index="test" &lt;BR /&gt;
| timechart values("Close/Last") span=1d&lt;/P&gt;

&lt;P&gt;Around 2014 starts mis-parsing (Statistics tab -&amp;gt; click on date -&amp;gt; view events -&amp;gt; _time is different than the event date).&lt;/P&gt;</description>
      <pubDate>Mon, 04 May 2020 20:23:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/CSV-date-being-replaced-not-parsed-correctly/m-p/490751#M83882</guid>
      <dc:creator>jaware_splunk</dc:creator>
      <dc:date>2020-05-04T20:23:31Z</dc:date>
    </item>
  </channel>
</rss>

