<?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: How to filter a list of timestamps less than _time in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-a-list-of-timestamps-less-than-time/m-p/750468#M242344</link>
    <description>&lt;P&gt;whoa! i didn't know about mode=multivalue.&amp;nbsp; thanks!&lt;/P&gt;</description>
    <pubDate>Fri, 25 Jul 2025 17:13:23 GMT</pubDate>
    <dc:creator>weidertc</dc:creator>
    <dc:date>2025-07-25T17:13:23Z</dc:date>
    <item>
      <title>How to filter a list of timestamps less than _time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-a-list-of-timestamps-less-than-time/m-p/750455#M242341</link>
      <description>&lt;P&gt;I need to filter a list of timestamps which are less than _time.&lt;/P&gt;&lt;P&gt;this works:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults count=1
| eval timestamps = mvappend("1570000000", "1570000020")
| eval older = mvfilter(timestamps &amp;lt; 1570000010)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but the compared value is whatever is in _time.&amp;nbsp; this does not work:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults count=1
| eval timestamps = mvappend("1570000000", "1570000020")
| eval _time = 1570000010
| eval older = mvfilter(timestamps &amp;lt; _time)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know timestamps work, because this does work:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults count=1
| eval timestamps = mvappend("1570000000", "1570000020")
| eval older = mvfilter(timestamps &amp;lt; now())&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Why does now() and static values work, but this does not:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults count=1
| eval timestamps = mvappend("1570000000", "1570000020")
| eval now_time = now()
| eval older = mvfilter(timestamps &amp;lt; now_time)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can i get a variable in there to compare, since i need to compare the list to _time?&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jul 2025 14:09:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-filter-a-list-of-timestamps-less-than-time/m-p/750455#M242341</guid>
      <dc:creator>weidertc</dc:creator>
      <dc:date>2025-07-25T14:09:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter a list of timestamps less than _time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-a-list-of-timestamps-less-than-time/m-p/750463#M242342</link>
      <description>&lt;P&gt;Have you tried using single quotes to tell &lt;FONT face="courier new,courier"&gt;eval&lt;/FONT&gt; you're referring to a field name?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval older = mvfilter(timestamps &amp;lt; '_time')&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jul 2025 15:53:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-filter-a-list-of-timestamps-less-than-time/m-p/750463#M242342</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2025-07-25T15:53:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter a list of timestamps less than _time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-a-list-of-timestamps-less-than-time/m-p/750464#M242343</link>
      <description>&lt;P&gt;mvfilter can only reference one field at a time&lt;/P&gt;&lt;H3&gt;&lt;SPAN class=""&gt;Description&lt;/SPAN&gt;&lt;/H3&gt;&lt;P&gt;This function filters a multivalue field based on an arbitrary Boolean expression. The Boolean expression can reference ONLY ONE field at a time.&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/MultivalueEvalFunctions#mvfilter.28.26lt.3Bpredicate.26gt.3B.29" target="_blank" rel="noopener"&gt;https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/MultivalueEvalFunctions#mvfilter.28.26lt.3Bpredicate.26gt.3B.29&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Try like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults count=1
| eval timestamps = mvappend("1700000000", "1800000020")
| foreach mode=multivalue timestamps
    [| eval older=if(&amp;lt;&amp;lt;ITEM&amp;gt;&amp;gt; &amp;lt; _time, mvappend(older,&amp;lt;&amp;lt;ITEM&amp;gt;&amp;gt;),older)]&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 25 Jul 2025 16:11:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-filter-a-list-of-timestamps-less-than-time/m-p/750464#M242343</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2025-07-25T16:11:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter a list of timestamps less than _time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-a-list-of-timestamps-less-than-time/m-p/750468#M242344</link>
      <description>&lt;P&gt;whoa! i didn't know about mode=multivalue.&amp;nbsp; thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jul 2025 17:13:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-filter-a-list-of-timestamps-less-than-time/m-p/750468#M242344</guid>
      <dc:creator>weidertc</dc:creator>
      <dc:date>2025-07-25T17:13:23Z</dc:date>
    </item>
  </channel>
</rss>

