<?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: Use values from inputlookup for date comparison in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-values-from-inputlookup-for-date-comparison/m-p/568377#M198069</link>
    <description>&lt;P&gt;The error message says:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Error in 'where' command: The operator at '="1630879200.000000"' is invalid.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;I assume that the number is the epoch I have evaluated from the inputlookup.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 24 Sep 2021 12:51:50 GMT</pubDate>
    <dc:creator>Jochen_Widmaier</dc:creator>
    <dc:date>2021-09-24T12:51:50Z</dc:date>
    <item>
      <title>How to use values from inputlookup for date comparison?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-values-from-inputlookup-for-date-comparison/m-p/568372#M198065</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I want to create a dashboard, where a user has a drop down input to select a named time frame ($value$). The start and end date of the time frame are defined in a lookup table.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Each of my events has a milestone date. I want to filter to those events where the milestone date is between the start and end date from the lookup table.&lt;/P&gt;
&lt;P&gt;I tried something like this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;index=my_index
| where milestone_date_epoch &amp;gt; [inputlookup mapping_lookup WHERE time_frame = $value$
    | eval startdate = strptime(Start_date, "%Y-%m-%d")
    | return startdate]
| where milestone_date_epoch &amp;lt; [inputlookup mapping_lookup WHERE time_frame = $value$
    | eval enddate = strptime(End_date, "%Y-%m-%d")
    | return enddate]&lt;/LI-CODE&gt;
&lt;P&gt;But I get an error message &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt; Can you help me to get this fixed?&lt;/P&gt;</description>
      <pubDate>Mon, 27 Sep 2021 22:04:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-values-from-inputlookup-for-date-comparison/m-p/568372#M198065</guid>
      <dc:creator>Jochen_Widmaier</dc:creator>
      <dc:date>2021-09-27T22:04:09Z</dc:date>
    </item>
    <item>
      <title>Re: Use values from inputlookup for date comparison</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-values-from-inputlookup-for-date-comparison/m-p/568375#M198067</link>
      <description>&lt;P&gt;What error message are you getting?&lt;/P&gt;</description>
      <pubDate>Fri, 24 Sep 2021 12:44:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-values-from-inputlookup-for-date-comparison/m-p/568375#M198067</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-09-24T12:44:26Z</dc:date>
    </item>
    <item>
      <title>Re: Use values from inputlookup for date comparison</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-values-from-inputlookup-for-date-comparison/m-p/568377#M198069</link>
      <description>&lt;P&gt;The error message says:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Error in 'where' command: The operator at '="1630879200.000000"' is invalid.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;I assume that the number is the epoch I have evaluated from the inputlookup.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Sep 2021 12:51:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-values-from-inputlookup-for-date-comparison/m-p/568377#M198069</guid>
      <dc:creator>Jochen_Widmaier</dc:creator>
      <dc:date>2021-09-24T12:51:50Z</dc:date>
    </item>
    <item>
      <title>Re: Use values from inputlookup for date comparison</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-values-from-inputlookup-for-date-comparison/m-p/568391#M198074</link>
      <description>&lt;P&gt;Try something like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=my_index
| where milestone_date_epoch &amp;gt; [inputlookup mapping_lookup WHERE time_frame = $value$
    | eval query = strptime(Start_date, "%Y-%m-%d")
    | format]
| where milestone_date_epoch &amp;lt; [inputlookup mapping_lookup WHERE time_frame = $value$
    | eval query = strptime(End_date, "%Y-%m-%d")
    | format]&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 24 Sep 2021 13:52:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-values-from-inputlookup-for-date-comparison/m-p/568391#M198074</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-09-24T13:52:50Z</dc:date>
    </item>
    <item>
      <title>Re: Use values from inputlookup for date comparison</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-values-from-inputlookup-for-date-comparison/m-p/568407#M198082</link>
      <description>&lt;P&gt;I tried your proposal. From the Splunk documentation I would have guessed it needs to work now (thank you for pointing me there, I didn't now the format command earlier). But unfortunately I get a new error message:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Error in 'where' command: Type checking failed. 'AND' only takes boolean arguments.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;But I don't have any AND in my query?!?&lt;/P&gt;</description>
      <pubDate>Fri, 24 Sep 2021 15:27:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-values-from-inputlookup-for-date-comparison/m-p/568407#M198082</guid>
      <dc:creator>Jochen_Widmaier</dc:creator>
      <dc:date>2021-09-24T15:27:23Z</dc:date>
    </item>
    <item>
      <title>Re: Use values from inputlookup for date comparison</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-values-from-inputlookup-for-date-comparison/m-p/568409#M198084</link>
      <description>&lt;PRE&gt;index=my_index
| where milestone_date_epoch &amp;gt; [inputlookup mapping_lookup WHERE time_frame = $value$
    | head 1
    | eval query = strptime(Start_date, "%Y-%m-%d")
    | table query
    | format]
| where milestone_date_epoch &amp;lt; [inputlookup mapping_lookup WHERE time_frame = $value$
    | head 1
    | eval query = strptime(End_date, "%Y-%m-%d")
    | table query
    | format]&lt;/PRE&gt;</description>
      <pubDate>Fri, 24 Sep 2021 15:35:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-values-from-inputlookup-for-date-comparison/m-p/568409#M198084</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-09-24T15:35:13Z</dc:date>
    </item>
    <item>
      <title>Re: Use values from inputlookup for date comparison</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-values-from-inputlookup-for-date-comparison/m-p/568517#M198129</link>
      <description>&lt;P&gt;Thank you very much &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;. Now it is working fine&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;. You are a true legend.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Sep 2021 06:03:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-values-from-inputlookup-for-date-comparison/m-p/568517#M198129</guid>
      <dc:creator>Jochen_Widmaier</dc:creator>
      <dc:date>2021-09-27T06:03:20Z</dc:date>
    </item>
  </channel>
</rss>

