<?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: Issue with strptime in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Issue-with-strptime/m-p/212499#M62249</link>
    <description>&lt;P&gt;Worked! Thank you for the great explanation!&lt;/P&gt;</description>
    <pubDate>Fri, 23 Sep 2016 20:27:31 GMT</pubDate>
    <dc:creator>singhh4</dc:creator>
    <dc:date>2016-09-23T20:27:31Z</dc:date>
    <item>
      <title>Issue with strptime</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Issue-with-strptime/m-p/212495#M62245</link>
      <description>&lt;P&gt;Hey guys,&lt;/P&gt;

&lt;P&gt;So I've used strptime before but for some reason this isn't working properly. I have a column with different types of data like below:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Column |Value                                                                                                                    ------------------                                                                                                                   02/2016 | 100                                                                                                                                  03/2016 | 200                                                                                                                       04/2016 | 150                                                                                                                                                                           05/2016 | 450                                                                                                                     high    | 12                                                                                                                          medium  | 30                                                                                                                     low     | 34
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I have a column that separates the dates from the rest. so with that me search s simple:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="servers" filter="dates" | eval myDate = strptime(Column, "%m/%Y")|table myDate 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;"filter" would be the field thats used separate the date from other data. This search gives me nothing. &lt;BR /&gt;
What would the problem and how would i get it to work? &lt;/P&gt;

&lt;P&gt;Thanks in advanced!&lt;/P&gt;</description>
      <pubDate>Fri, 23 Sep 2016 19:59:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Issue-with-strptime/m-p/212495#M62245</guid>
      <dc:creator>singhh4</dc:creator>
      <dc:date>2016-09-23T19:59:25Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with strptime</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Issue-with-strptime/m-p/212496#M62246</link>
      <description>&lt;P&gt;The screen shot has a "Column" field, but the SPL has "Columns".  Parsing a column that doesn't exist will yield nothing.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Sep 2016 20:04:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Issue-with-strptime/m-p/212496#M62246</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2016-09-23T20:04:00Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with strptime</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Issue-with-strptime/m-p/212497#M62247</link>
      <description>&lt;P&gt;Just an error when asking question. Fixed but the issue is still the same. Sorry about that&lt;/P&gt;</description>
      <pubDate>Fri, 23 Sep 2016 20:06:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Issue-with-strptime/m-p/212497#M62247</guid>
      <dc:creator>singhh4</dc:creator>
      <dc:date>2016-09-23T20:06:54Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with strptime</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Issue-with-strptime/m-p/212498#M62248</link>
      <description>&lt;P&gt;The issue here is that strptime need both date and month to parse a string formated date to epoch. Year is optional. Your data doesn't have date part, hence strptime fails. &lt;/P&gt;

&lt;P&gt;Option: add date part explicitly (when using month you anyways refer to first date of the month).&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index="servers" filter="dates" | eval myDate = strptime("01/".Columns, "%d/%m/%Y")|table myDate 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 23 Sep 2016 20:20:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Issue-with-strptime/m-p/212498#M62248</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-09-23T20:20:15Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with strptime</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Issue-with-strptime/m-p/212499#M62249</link>
      <description>&lt;P&gt;Worked! Thank you for the great explanation!&lt;/P&gt;</description>
      <pubDate>Fri, 23 Sep 2016 20:27:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Issue-with-strptime/m-p/212499#M62249</guid>
      <dc:creator>singhh4</dc:creator>
      <dc:date>2016-09-23T20:27:31Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with strptime</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Issue-with-strptime/m-p/212500#M62250</link>
      <description>&lt;P&gt;+1, Somesoni Sir. &lt;/P&gt;

&lt;P&gt;One question - &lt;BR /&gt;
///Option: add date part explicitly (when using month you anyways refer to first date of the month).///&lt;BR /&gt;
why refer to first date, when using month?!?&lt;/P&gt;</description>
      <pubDate>Fri, 23 Sep 2016 20:52:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Issue-with-strptime/m-p/212500#M62250</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2016-09-23T20:52:02Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with strptime</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Issue-with-strptime/m-p/212501#M62251</link>
      <description>&lt;P&gt;Take the reference of the timechart with span=1mon. All the _time value will be set to "01/Month/Year 00:00:00 AM". While bucketing Splunk assigns lower value to the bucket, for month it'll be first day.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Sep 2016 20:54:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Issue-with-strptime/m-p/212501#M62251</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-09-23T20:54:58Z</dc:date>
    </item>
  </channel>
</rss>

