<?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 timestamp extraction issue in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/CSV-timestamp-extraction-issue/m-p/179060#M35885</link>
    <description>&lt;P&gt;Thanks for your reply.&lt;BR /&gt;
I tried this using data preview and advanced mode (pros.conf) but it shows the same result. I am using splunk 6.0.2. Anything else I can try?&lt;/P&gt;</description>
    <pubDate>Sun, 09 Mar 2014 06:03:17 GMT</pubDate>
    <dc:creator>sains</dc:creator>
    <dc:date>2014-03-09T06:03:17Z</dc:date>
    <item>
      <title>CSV timestamp extraction issue</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/CSV-timestamp-extraction-issue/m-p/179058#M35883</link>
      <description>&lt;P&gt;I am indexing a simple CSV file local on the spunk server. I am trying to extract the correct time stamp from the CSV file (every line is an event) but splunk keep using the file's modified date as the timestamp. Below is the sample line from the csv file and the regex I am trying. what am I doing wrong here?&lt;BR /&gt;
Sample line&lt;BR /&gt;
"03/04/2014","58.71","*",""," xxxxxxxxxxx9682"&lt;/P&gt;

&lt;P&gt;regex I have tried so far&lt;BR /&gt;
\d{2}/\d{2}/\d{4}&lt;BR /&gt;
^"\d{2}/\d{2}/\d{4}"&lt;BR /&gt;
"\d{2}/\d{2}/\d{4}"&lt;/P&gt;

&lt;P&gt;Also tried the following time format&lt;/P&gt;

&lt;P&gt;%m/%d/%Y&lt;/P&gt;</description>
      <pubDate>Sun, 09 Mar 2014 04:46:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/CSV-timestamp-extraction-issue/m-p/179058#M35883</guid>
      <dc:creator>sains</dc:creator>
      <dc:date>2014-03-09T04:46:00Z</dc:date>
    </item>
    <item>
      <title>Re: CSV timestamp extraction issue</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/CSV-timestamp-extraction-issue/m-p/179059#M35884</link>
      <description>&lt;P&gt;I would use Splunk's data preview to help with this. But add this stanza to &lt;CODE&gt;props.conf&lt;/CODE&gt; and you should be okay. BTW, this assumes that you set the sourcetype to "myCSV" in &lt;CODE&gt;inputs.conf&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;props.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[myCSV]
SHOULD_LINEMERGE = false
MAX_TIMESTAMP_LOOKAHEAD = 15
TIME_FORMAT = %m/%d/%Y
INDEXED_EXTRACTIONS = CSV
FIELD_NAMES = tstamp, field1, field2, field3, ccnum
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The last 2 lines may not apply if you are not using Splunk 6.&lt;/P&gt;</description>
      <pubDate>Sun, 09 Mar 2014 05:35:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/CSV-timestamp-extraction-issue/m-p/179059#M35884</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2014-03-09T05:35:29Z</dc:date>
    </item>
    <item>
      <title>Re: CSV timestamp extraction issue</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/CSV-timestamp-extraction-issue/m-p/179060#M35885</link>
      <description>&lt;P&gt;Thanks for your reply.&lt;BR /&gt;
I tried this using data preview and advanced mode (pros.conf) but it shows the same result. I am using splunk 6.0.2. Anything else I can try?&lt;/P&gt;</description>
      <pubDate>Sun, 09 Mar 2014 06:03:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/CSV-timestamp-extraction-issue/m-p/179060#M35885</guid>
      <dc:creator>sains</dc:creator>
      <dc:date>2014-03-09T06:03:17Z</dc:date>
    </item>
    <item>
      <title>Re: CSV timestamp extraction issue</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/CSV-timestamp-extraction-issue/m-p/179061#M35886</link>
      <description>&lt;P&gt;It works if my csv file has time stamp in addition to date e.g. "03/04/2014 00:00:00".&lt;BR /&gt;
Any way to do it with just the date stamp?&lt;/P&gt;</description>
      <pubDate>Sun, 09 Mar 2014 21:34:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/CSV-timestamp-extraction-issue/m-p/179061#M35886</guid>
      <dc:creator>sains</dc:creator>
      <dc:date>2014-03-09T21:34:43Z</dc:date>
    </item>
    <item>
      <title>Re: CSV timestamp extraction issue</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/CSV-timestamp-extraction-issue/m-p/179062#M35887</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;short test with "your" data in data preview mode &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Specify timestamp format (strptime) = %m/%d/%Y
Timestamp is always prefaced by a pattern = ^"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;results to the following props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;TIME_FORMAT=%m/%d/%Y
TIME_PREFIX=^"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;works for me.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Mar 2014 09:55:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/CSV-timestamp-extraction-issue/m-p/179062#M35887</guid>
      <dc:creator>nekb1958</dc:creator>
      <dc:date>2014-03-10T09:55:35Z</dc:date>
    </item>
    <item>
      <title>Re: CSV timestamp extraction issue</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/CSV-timestamp-extraction-issue/m-p/179063#M35888</link>
      <description>&lt;P&gt;This worked!. I thought I tried this before but might have missed something. thanks for your help.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Mar 2014 15:44:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/CSV-timestamp-extraction-issue/m-p/179063#M35888</guid>
      <dc:creator>sains</dc:creator>
      <dc:date>2014-03-10T15:44:53Z</dc:date>
    </item>
  </channel>
</rss>

