<?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: Using single column Holiday table how do I determine whether today is a holiday? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Using-single-column-Holiday-table-how-do-I-determine-whether/m-p/518589#M145911</link>
    <description>&lt;P&gt;Your currentdate date format is wrong based on your example of 01/01/2020 in the CSV. Your format is&lt;/P&gt;&lt;P&gt;%-m/%-d&lt;/P&gt;&lt;P&gt;but it should be %m/%s, so it has leading zeros&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 09 Sep 2020 03:24:14 GMT</pubDate>
    <dc:creator>bowesmana</dc:creator>
    <dc:date>2020-09-09T03:24:14Z</dc:date>
    <item>
      <title>Using single column Holiday table how do I determine whether today is a holiday?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-single-column-Holiday-table-how-do-I-determine-whether/m-p/518585#M145910</link>
      <description>&lt;P&gt;I have a lookup CSV table that lists dates of holidays in a single column.&lt;/P&gt;&lt;P&gt;HolidayTable.csv:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="100%" height="25px"&gt;HDate&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="100%" height="25px"&gt;1/1/2020&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="100%" height="25px"&gt;...................&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to use the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;search ...
| eval currentdate=strftime(now(),"%-m/%-d/%Y") 
| lookup HolidayTable.csv HDate as currentdate OUTPUT HDate as Holiday
| eval Holiday=if(isnull(Holiday), "N", "Y")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My expectation was that when the current date matches a row in the table I will get the &lt;STRONG&gt;date&lt;/STRONG&gt;&amp;nbsp; &lt;STRONG&gt;string&lt;/STRONG&gt; and otherwise - &lt;STRONG&gt;null.&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;It does not seem to work this way.&lt;BR /&gt;&lt;BR /&gt;What am I missing here?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Sep 2020 13:19:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-single-column-Holiday-table-how-do-I-determine-whether/m-p/518585#M145910</guid>
      <dc:creator>pm771</dc:creator>
      <dc:date>2020-09-09T13:19:57Z</dc:date>
    </item>
    <item>
      <title>Re: Using single column Holiday table how do I determine whether today is a holiday?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-single-column-Holiday-table-how-do-I-determine-whether/m-p/518589#M145911</link>
      <description>&lt;P&gt;Your currentdate date format is wrong based on your example of 01/01/2020 in the CSV. Your format is&lt;/P&gt;&lt;P&gt;%-m/%-d&lt;/P&gt;&lt;P&gt;but it should be %m/%s, so it has leading zeros&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Sep 2020 03:24:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-single-column-Holiday-table-how-do-I-determine-whether/m-p/518589#M145911</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2020-09-09T03:24:14Z</dc:date>
    </item>
    <item>
      <title>Re: Using single column Holiday table how do I determine whether today is a holiday?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-single-column-Holiday-table-how-do-I-determine-whether/m-p/518696#M145948</link>
      <description>&lt;P&gt;It was a typo in my question. Month and day in my table are without leading zeroes.&lt;BR /&gt;&lt;BR /&gt;Since the table is going to be maintained via Excel, I had to use the default date format.&lt;/P&gt;&lt;P&gt;I will update the question.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Sep 2020 15:05:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-single-column-Holiday-table-how-do-I-determine-whether/m-p/518696#M145948</guid>
      <dc:creator>pm771</dc:creator>
      <dc:date>2020-09-09T15:05:16Z</dc:date>
    </item>
    <item>
      <title>Re: Using single column Holiday table how do I determine whether today is a holiday?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-single-column-Holiday-table-how-do-I-determine-whether/m-p/521392#M146929</link>
      <description>&lt;P&gt;[Following up with my own solution]&lt;/P&gt;&lt;P&gt;I ended up with creating a dummy 2nd column.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="100%" height="25px"&gt;HDate&lt;/TD&gt;&lt;TD width="50%"&gt;Off&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="100%" height="25px"&gt;1/1/2020&lt;/TD&gt;&lt;TD width="50%"&gt;Y&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="100%" height="25px"&gt;...................&lt;/TD&gt;&lt;TD width="50%"&gt;Y&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And with a slight change (used new column as returned value) my code started working:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;search ...
| eval currentdate=strftime(now(),"%-m/%-d/%Y") 
| lookup HolidayTable.csv HDate as currentdate OUTPUT Off as Holiday
| eval Holiday=if(isnull(Holiday), "N", "Y")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Sep 2020 02:09:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-single-column-Holiday-table-how-do-I-determine-whether/m-p/521392#M146929</guid>
      <dc:creator>pm771</dc:creator>
      <dc:date>2020-09-25T02:09:00Z</dc:date>
    </item>
  </channel>
</rss>

