<?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: Looking at timestamps over 1 year old in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Looking-at-timestamps-over-1-year-old/m-p/134708#M27700</link>
    <description>&lt;P&gt;This worked perfectly! Thank you.&lt;/P&gt;</description>
    <pubDate>Wed, 03 Jun 2015 17:25:07 GMT</pubDate>
    <dc:creator>rescobar713</dc:creator>
    <dc:date>2015-06-03T17:25:07Z</dc:date>
    <item>
      <title>Looking at timestamps over 1 year old</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Looking-at-timestamps-over-1-year-old/m-p/134705#M27697</link>
      <description>&lt;P&gt;I'm trying to only look at events that were modified over 1 year ago.  I have a timestamp field called &lt;CODE&gt;last_modified&lt;/CODE&gt; that I believe is in the form of a string (e.g. "1/1/2014").  How would I go about finding the difference between the current date and the last_modified date, and then filtering out all events for which that difference is less than 1 year? I've tried using the &lt;CODE&gt;strptime&lt;/CODE&gt; function to convert the &lt;CODE&gt;last_modified&lt;/CODE&gt;string to epoch time and then doing arithmetic with that and &lt;CODE&gt;now()&lt;/CODE&gt;, but &lt;CODE&gt;strptime&lt;/CODE&gt;didn't seem to work with &lt;CODE&gt;last_modified&lt;/CODE&gt;.  &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;last_modified&lt;/CODE&gt;is a value I retrieved from a lookup table that stores timestamps in epoch time, so it seems that it was converted to a human-readable string when the lookup was done. But I'm not sure why &lt;CODE&gt;strptime&lt;/CODE&gt; isn't working.&lt;/P&gt;

&lt;P&gt;Any advice?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 20:07:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Looking-at-timestamps-over-1-year-old/m-p/134705#M27697</guid>
      <dc:creator>rescobar713</dc:creator>
      <dc:date>2020-09-28T20:07:33Z</dc:date>
    </item>
    <item>
      <title>Re: Looking at timestamps over 1 year old</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Looking-at-timestamps-over-1-year-old/m-p/134706#M27698</link>
      <description>&lt;P&gt;You are on the right track but probably are using a bad &lt;CODE&gt;strptime&lt;/CODE&gt; string.  It should be like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | eval last_modified_epoch=strptime(last_modified, "%m/%d/%Y") | eval modAgeSeconds = now() - last_modified_epoch | where modAgeSeconds &amp;gt; 31536000
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Make sure that your &lt;CODE&gt;timepicker&lt;/CODE&gt; is REALLY long (like maybe "All time").&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jun 2015 17:18:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Looking-at-timestamps-over-1-year-old/m-p/134706#M27698</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-06-03T17:18:42Z</dc:date>
    </item>
    <item>
      <title>Re: Looking at timestamps over 1 year old</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Looking-at-timestamps-over-1-year-old/m-p/134707#M27699</link>
      <description>&lt;P&gt;Perhaps you just need to tweak your strptime format string.  A sample of your year-old events will help.&lt;BR /&gt;
Does last_modified match _time?  If so, you can use &lt;CODE&gt;latest=-12m@m&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jun 2015 17:18:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Looking-at-timestamps-over-1-year-old/m-p/134707#M27699</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2015-06-03T17:18:49Z</dc:date>
    </item>
    <item>
      <title>Re: Looking at timestamps over 1 year old</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Looking-at-timestamps-over-1-year-old/m-p/134708#M27700</link>
      <description>&lt;P&gt;This worked perfectly! Thank you.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jun 2015 17:25:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Looking-at-timestamps-over-1-year-old/m-p/134708#M27700</guid>
      <dc:creator>rescobar713</dc:creator>
      <dc:date>2015-06-03T17:25:07Z</dc:date>
    </item>
  </channel>
</rss>

