<?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 date parsing in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/date-parsing/m-p/85294#M21776</link>
    <description>&lt;P&gt;I've got date field in a splunk log that looks like:  &lt;STRONG&gt;firstOccurrence=2012/06/27 14:55:12&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;Splunk does not interpret this as "date" field.  As far as Splunk is concerned, it is only a set of strings.  What query will allow me to query for all FirstOccurance that is older then 30 days?&lt;/P&gt;

&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
    <pubDate>Wed, 27 Jun 2012 17:23:56 GMT</pubDate>
    <dc:creator>DTERM</dc:creator>
    <dc:date>2012-06-27T17:23:56Z</dc:date>
    <item>
      <title>date parsing</title>
      <link>https://community.splunk.com/t5/Splunk-Search/date-parsing/m-p/85294#M21776</link>
      <description>&lt;P&gt;I've got date field in a splunk log that looks like:  &lt;STRONG&gt;firstOccurrence=2012/06/27 14:55:12&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;Splunk does not interpret this as "date" field.  As far as Splunk is concerned, it is only a set of strings.  What query will allow me to query for all FirstOccurance that is older then 30 days?&lt;/P&gt;

&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jun 2012 17:23:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/date-parsing/m-p/85294#M21776</guid>
      <dc:creator>DTERM</dc:creator>
      <dc:date>2012-06-27T17:23:56Z</dc:date>
    </item>
    <item>
      <title>Re: date parsing</title>
      <link>https://community.splunk.com/t5/Splunk-Search/date-parsing/m-p/85295#M21777</link>
      <description>&lt;P&gt;Isn't the issue here why you haven't had Splunk index this field as something it should use when timestamping events? You've asked about this in a separate thread, I think it's a better idea to carry on the discussion there.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jun 2012 17:51:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/date-parsing/m-p/85295#M21777</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2012-06-27T17:51:37Z</dc:date>
    </item>
    <item>
      <title>Re: date parsing</title>
      <link>https://community.splunk.com/t5/Splunk-Search/date-parsing/m-p/85296#M21778</link>
      <description>&lt;P&gt;You could do something like this:&lt;/P&gt;

&lt;P&gt;Assuming splunk is extracting the field "firstOccurrence" with the value "2012/06/27 14:55:12", then you can add something like this to your search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | eval first=strptime(firstOccurrence, "%Y/%m/%d %H:%M:%S") | where relative_time(now(), "-30d")&amp;gt;first
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;However, if this should be the timestamp of your events, then you should get that corrected.   Having events indexed without a proper timestamp will create all kinds of issues long-term.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jun 2012 18:45:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/date-parsing/m-p/85296#M21778</guid>
      <dc:creator>Lowell</dc:creator>
      <dc:date>2012-06-27T18:45:08Z</dc:date>
    </item>
    <item>
      <title>Re: date parsing</title>
      <link>https://community.splunk.com/t5/Splunk-Search/date-parsing/m-p/85297#M21779</link>
      <description>&lt;P&gt;Perfect!!  Thanks so much!!&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jun 2012 18:09:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/date-parsing/m-p/85297#M21779</guid>
      <dc:creator>DTERM</dc:creator>
      <dc:date>2012-06-28T18:09:28Z</dc:date>
    </item>
  </channel>
</rss>

