<?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 Defining time column in .csv uploaded in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Defining-time-column-in-csv-uploaded/m-p/443919#M77291</link>
    <description>&lt;P&gt;Good afternoon.&lt;/P&gt;

&lt;P&gt;This question might be already answered. But so far I searched I had no luck in understanding how to fix my issue. I worked before coding search syntax with Splunk but never before doing admin stuff inside Splunk.&lt;/P&gt;

&lt;P&gt;I have a csv file with some columns and one of them is "Date" field which I want to use to sort the values in my other columns example:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;date      Total Ransom&lt;BR /&gt;
01/07/2017  0&lt;BR /&gt;
01/08/2017  160&lt;BR /&gt;
01/09/2017  191&lt;BR /&gt;
01/10/2017  257&lt;BR /&gt;
01/11/2017  147&lt;BR /&gt;
01/12/2017  194&lt;BR /&gt;
01/01/2018  77&lt;BR /&gt;
01/02/2018  187&lt;BR /&gt;
01/03/2018  364&lt;BR /&gt;
01/04/2018  274&lt;BR /&gt;
01/05/2018  85&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;I would need to make a count with &lt;STRONG&gt;"Total Ransom"&lt;/STRONG&gt; sorted by &lt;STRONG&gt;"Date"&lt;/STRONG&gt; is pretty easy, but I cant define Date as _time.&lt;/P&gt;

&lt;P&gt;¿How would I be able to do this? I read something about modifying the file &lt;STRONG&gt;datetime.xml&lt;/STRONG&gt; , but I want to be sure before I modify a system file.&lt;/P&gt;

&lt;P&gt;Thanks for your time in advance!&lt;/P&gt;</description>
    <pubDate>Fri, 13 Jul 2018 13:55:42 GMT</pubDate>
    <dc:creator>kiraitachi</dc:creator>
    <dc:date>2018-07-13T13:55:42Z</dc:date>
    <item>
      <title>Defining time column in .csv uploaded</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Defining-time-column-in-csv-uploaded/m-p/443919#M77291</link>
      <description>&lt;P&gt;Good afternoon.&lt;/P&gt;

&lt;P&gt;This question might be already answered. But so far I searched I had no luck in understanding how to fix my issue. I worked before coding search syntax with Splunk but never before doing admin stuff inside Splunk.&lt;/P&gt;

&lt;P&gt;I have a csv file with some columns and one of them is "Date" field which I want to use to sort the values in my other columns example:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;date      Total Ransom&lt;BR /&gt;
01/07/2017  0&lt;BR /&gt;
01/08/2017  160&lt;BR /&gt;
01/09/2017  191&lt;BR /&gt;
01/10/2017  257&lt;BR /&gt;
01/11/2017  147&lt;BR /&gt;
01/12/2017  194&lt;BR /&gt;
01/01/2018  77&lt;BR /&gt;
01/02/2018  187&lt;BR /&gt;
01/03/2018  364&lt;BR /&gt;
01/04/2018  274&lt;BR /&gt;
01/05/2018  85&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;I would need to make a count with &lt;STRONG&gt;"Total Ransom"&lt;/STRONG&gt; sorted by &lt;STRONG&gt;"Date"&lt;/STRONG&gt; is pretty easy, but I cant define Date as _time.&lt;/P&gt;

&lt;P&gt;¿How would I be able to do this? I read something about modifying the file &lt;STRONG&gt;datetime.xml&lt;/STRONG&gt; , but I want to be sure before I modify a system file.&lt;/P&gt;

&lt;P&gt;Thanks for your time in advance!&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jul 2018 13:55:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Defining-time-column-in-csv-uploaded/m-p/443919#M77291</guid>
      <dc:creator>kiraitachi</dc:creator>
      <dc:date>2018-07-13T13:55:42Z</dc:date>
    </item>
    <item>
      <title>Re: Defining time column in .csv uploaded</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Defining-time-column-in-csv-uploaded/m-p/443920#M77292</link>
      <description>&lt;P&gt;Try this&lt;BR /&gt;
&lt;PRE&gt; | inputlookup my_lookup.csv | eval New_Date = strptime(Date, "%d/%m/%Y")| sort New_Date | fields - New_Date &lt;/PRE&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 20:26:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Defining-time-column-in-csv-uploaded/m-p/443920#M77292</guid>
      <dc:creator>pradeepkumarg</dc:creator>
      <dc:date>2020-09-29T20:26:36Z</dc:date>
    </item>
    <item>
      <title>Re: Defining time column in .csv uploaded</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Defining-time-column-in-csv-uploaded/m-p/443921#M77293</link>
      <description>&lt;P&gt;Use &lt;CODE&gt;INDEXED_EXTRACTIONS&lt;/CODE&gt; as documented here:&lt;/P&gt;

&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/Admin/Propsconf"&gt;https://docs.splunk.com/Documentation/Splunk/latest/Admin/Propsconf&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 15 Jul 2018 16:57:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Defining-time-column-in-csv-uploaded/m-p/443921#M77293</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2018-07-15T16:57:01Z</dc:date>
    </item>
    <item>
      <title>Re: Defining time column in .csv uploaded</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Defining-time-column-in-csv-uploaded/m-p/443922#M77294</link>
      <description>&lt;P&gt;So answering to myself. I tried above answers but where not quite what I was looking for.&lt;/P&gt;

&lt;P&gt;Although I found how to do it following &lt;A href="http://docs.splunk.com/Documentation/Splunk/7.1.2/Data/Configuretimestamprecognition"&gt;http://docs.splunk.com/Documentation/Splunk/7.1.2/Data/Configuretimestamprecognition&lt;/A&gt; &lt;/P&gt;

&lt;P&gt;As simple as to follow properly the formas supported:&lt;/P&gt;

&lt;P&gt;strptime() format expression examples&lt;BR /&gt;
Here are some sample date formats, with the strptime() expressions that handle them:&lt;/P&gt;

&lt;P&gt;1998-12-31   %Y-%m-%d&lt;BR /&gt;
98-12-31     %y-%m-%d&lt;BR /&gt;
1998 years, 312 days     %Y years, %j days&lt;BR /&gt;
Jan 24, 2003     %b %d, %Y&lt;BR /&gt;
January 24, 2003     %B %d, %Y&lt;BR /&gt;
1397477611.862   %s.%3N&lt;/P&gt;

&lt;P&gt;So when specifying timefield input, go to custom and specify the field that has the "date" and its format.&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jul 2018 13:17:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Defining-time-column-in-csv-uploaded/m-p/443922#M77294</guid>
      <dc:creator>kiraitachi</dc:creator>
      <dc:date>2018-07-16T13:17:16Z</dc:date>
    </item>
    <item>
      <title>Re: Defining time column in .csv uploaded</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Defining-time-column-in-csv-uploaded/m-p/443923#M77295</link>
      <description>&lt;P&gt;You should click &lt;CODE&gt;Accept&lt;/CODE&gt; on your answer and &lt;CODE&gt;UpVote&lt;/CODE&gt; any others that helped.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jul 2018 14:08:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Defining-time-column-in-csv-uploaded/m-p/443923#M77295</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2018-07-16T14:08:26Z</dc:date>
    </item>
  </channel>
</rss>

