<?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 How to create custom relative date and time in Splunk in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-create-custom-relative-date-and-time-in-Splunk/m-p/429017#M75172</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have lot of alerts which even trigger during the maintenance period causing false incidents. The cmdb has the maintenance schedule but in the formats like &lt;STRONG&gt;"1st&amp;amp;3rd-Friday@10am"&lt;/STRONG&gt;,  &lt;STRONG&gt;"2nd&amp;amp;4th-Monday@6pm"&lt;/STRONG&gt; and so on. I am trying to prase this time in Splunk search query so that i can create Starttime &amp;amp; Endtime for which the alert will not trigger.&lt;/P&gt;

&lt;P&gt;I am able to &lt;STRONG&gt;"| eval CurrentDay = strftime(now(), "%A")"&lt;/STRONG&gt; which gives me the current day like whether today is Monday/Tuesday or what day, but how do i find out if it is first monday of the month or 2nd monday or so for me to address this requirement.&lt;/P&gt;

&lt;P&gt;Anyone who can point me towards some direction in addressing this?&lt;/P&gt;</description>
    <pubDate>Tue, 12 Mar 2019 08:52:46 GMT</pubDate>
    <dc:creator>ashish9433</dc:creator>
    <dc:date>2019-03-12T08:52:46Z</dc:date>
    <item>
      <title>How to create custom relative date and time in Splunk</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-create-custom-relative-date-and-time-in-Splunk/m-p/429017#M75172</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have lot of alerts which even trigger during the maintenance period causing false incidents. The cmdb has the maintenance schedule but in the formats like &lt;STRONG&gt;"1st&amp;amp;3rd-Friday@10am"&lt;/STRONG&gt;,  &lt;STRONG&gt;"2nd&amp;amp;4th-Monday@6pm"&lt;/STRONG&gt; and so on. I am trying to prase this time in Splunk search query so that i can create Starttime &amp;amp; Endtime for which the alert will not trigger.&lt;/P&gt;

&lt;P&gt;I am able to &lt;STRONG&gt;"| eval CurrentDay = strftime(now(), "%A")"&lt;/STRONG&gt; which gives me the current day like whether today is Monday/Tuesday or what day, but how do i find out if it is first monday of the month or 2nd monday or so for me to address this requirement.&lt;/P&gt;

&lt;P&gt;Anyone who can point me towards some direction in addressing this?&lt;/P&gt;</description>
      <pubDate>Tue, 12 Mar 2019 08:52:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-create-custom-relative-date-and-time-in-Splunk/m-p/429017#M75172</guid>
      <dc:creator>ashish9433</dc:creator>
      <dc:date>2019-03-12T08:52:46Z</dc:date>
    </item>
  </channel>
</rss>

