<?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: compare 6 months ago to start date(can be any specific date) in Splunk Enterprise</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise/compare-6-months-ago-to-start-date-can-be-any-specific-date/m-p/556411#M6169</link>
    <description>&lt;P&gt;still no change:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="rivkah01_0-1624191072166.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/14696iB7086F95FCE98EED/image-size/medium?v=v2&amp;amp;px=400" role="button" title="rivkah01_0-1624191072166.png" alt="rivkah01_0-1624191072166.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 20 Jun 2021 12:11:20 GMT</pubDate>
    <dc:creator>rivkah01</dc:creator>
    <dc:date>2021-06-20T12:11:20Z</dc:date>
    <item>
      <title>compare 6 months ago to start date(can be any specific date)</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/compare-6-months-ago-to-start-date-can-be-any-specific-date/m-p/556134#M6134</link>
      <description>&lt;DIV&gt;we need to check which courses were started during the month of last half a year.&lt;/DIV&gt;&lt;P&gt;&lt;SPAN&gt;the code I wrote for it:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;"st&lt;SPAN&gt;art date" - format :&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;2021-03-22 f&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"last_6_months".&amp;nbsp; - calculated now()-6 month&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;below the query we tried but its not working&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;could you please advise?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;`ssdlc_base("all time back")`&lt;BR /&gt;| where email_address!="NA"&lt;BR /&gt;| lookup ssdlc_bu_courses.csv BU output courses&lt;BR /&gt;| mvexpand courses&lt;BR /&gt;| lookup ssdlc_bu_courses.csv BU courses output "start date"&lt;BR /&gt;| rename "start date" as "start_date1"&lt;BR /&gt;| mvexpand "start_date1"&lt;BR /&gt;| eval start_date=strptime(strftime(start_date1,"%Y-%m-%d")."-01","%Y-%m-%d")&lt;BR /&gt;| eval last_6_months=strptime(strftime(relative_time(now(),"-6mon"),"%Y-%m")."-01","%Y-%m-%d")&lt;BR /&gt;| fields start_date ,last_6_months , start_date1&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jun 2021 07:59:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/compare-6-months-ago-to-start-date-can-be-any-specific-date/m-p/556134#M6134</guid>
      <dc:creator>rivkah01</dc:creator>
      <dc:date>2021-06-17T07:59:35Z</dc:date>
    </item>
    <item>
      <title>Re: compare 6 months ago to start date(can be any specific date)</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/compare-6-months-ago-to-start-date-can-be-any-specific-date/m-p/556138#M6135</link>
      <description>&lt;P&gt;Try changing these two lines&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval start_date=relative_time(start_date1,"@mon")
| eval last_6_months=relative_time(now(),"-6mon@mon")&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 17 Jun 2021 08:18:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/compare-6-months-ago-to-start-date-can-be-any-specific-date/m-p/556138#M6135</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-06-17T08:18:29Z</dc:date>
    </item>
    <item>
      <title>Re: compare 6 months ago to start date(can be any specific date)</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/compare-6-months-ago-to-start-date-can-be-any-specific-date/m-p/556408#M6167</link>
      <description>&lt;P&gt;not working the dates are not in the same format.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="rivkah01_0-1624190537377.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/14695i5B3BE3C85696A9F6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="rivkah01_0-1624190537377.png" alt="rivkah01_0-1624190537377.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 20 Jun 2021 12:02:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/compare-6-months-ago-to-start-date-can-be-any-specific-date/m-p/556408#M6167</guid>
      <dc:creator>rivkah01</dc:creator>
      <dc:date>2021-06-20T12:02:26Z</dc:date>
    </item>
    <item>
      <title>Re: compare 6 months ago to start date(can be any specific date)</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/compare-6-months-ago-to-start-date-can-be-any-specific-date/m-p/556409#M6168</link>
      <description>&lt;LI-CODE lang="markup"&gt;| eval start_date=relative_time(strptime(start_date1,"%Y-%m-%d"),"@mon")
| eval last_6_months=relative_time(now(),"-6mon@mon")&lt;/LI-CODE&gt;</description>
      <pubDate>Sun, 20 Jun 2021 12:04:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/compare-6-months-ago-to-start-date-can-be-any-specific-date/m-p/556409#M6168</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-06-20T12:04:55Z</dc:date>
    </item>
    <item>
      <title>Re: compare 6 months ago to start date(can be any specific date)</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/compare-6-months-ago-to-start-date-can-be-any-specific-date/m-p/556411#M6169</link>
      <description>&lt;P&gt;still no change:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="rivkah01_0-1624191072166.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/14696iB7086F95FCE98EED/image-size/medium?v=v2&amp;amp;px=400" role="button" title="rivkah01_0-1624191072166.png" alt="rivkah01_0-1624191072166.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 20 Jun 2021 12:11:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/compare-6-months-ago-to-start-date-can-be-any-specific-date/m-p/556411#M6169</guid>
      <dc:creator>rivkah01</dc:creator>
      <dc:date>2021-06-20T12:11:20Z</dc:date>
    </item>
    <item>
      <title>Re: compare 6 months ago to start date(can be any specific date)</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/compare-6-months-ago-to-start-date-can-be-any-specific-date/m-p/556412#M6170</link>
      <description>&lt;P&gt;The field you are showing is "start date" not start_date. What is is start_date and start_date1?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 20 Jun 2021 12:16:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/compare-6-months-ago-to-start-date-can-be-any-specific-date/m-p/556412#M6170</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-06-20T12:16:20Z</dc:date>
    </item>
    <item>
      <title>Re: compare 6 months ago to start date(can be any specific date)</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/compare-6-months-ago-to-start-date-can-be-any-specific-date/m-p/556519#M6191</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="rivkah01_0-1624280950116.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/14716iE968CC49F8876988/image-size/medium?v=v2&amp;amp;px=400" role="button" title="rivkah01_0-1624280950116.png" alt="rivkah01_0-1624280950116.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;no data for start_date&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jun 2021 13:09:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/compare-6-months-ago-to-start-date-can-be-any-specific-date/m-p/556519#M6191</guid>
      <dc:creator>rivkah01</dc:creator>
      <dc:date>2021-06-21T13:09:24Z</dc:date>
    </item>
    <item>
      <title>Re: compare 6 months ago to start date(can be any specific date)</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/compare-6-months-ago-to-start-date-can-be-any-specific-date/m-p/556523#M6193</link>
      <description>&lt;P&gt;That's because you removed the rename you had previously. Either put it back in or use&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval start_date=relative_time(strptime('start date',"%Y-%m-%d"),"@mon")
| eval last_6_months=relative_time(now(),"-6mon@mon")&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 21 Jun 2021 13:39:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/compare-6-months-ago-to-start-date-can-be-any-specific-date/m-p/556523#M6193</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-06-21T13:39:30Z</dc:date>
    </item>
    <item>
      <title>Re: compare 6 months ago to start date(can be any specific date)</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/compare-6-months-ago-to-start-date-can-be-any-specific-date/m-p/556542#M6195</link>
      <description>&lt;P&gt;I had a couple questions in your start date format, what does the "f" at the end of the date format mean?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2021-06-21 10_11_35-Reply to Message - Splunk Community.png" style="width: 292px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/14719i7047FC8B8BD66B83/image-size/large?v=v2&amp;amp;px=999" role="button" title="2021-06-21 10_11_35-Reply to Message - Splunk Community.png" alt="2021-06-21 10_11_35-Reply to Message - Splunk Community.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Can you provide a sample value of "start_date1" from just after mvexpand "start_date1" but before you perform any evals on it?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2021-06-21 10_11_58-Reply to Message - Splunk Community.png" style="width: 761px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/14720i511701CD4D65011A/image-size/large?v=v2&amp;amp;px=999" role="button" title="2021-06-21 10_11_58-Reply to Message - Splunk Community.png" alt="2021-06-21 10_11_58-Reply to Message - Splunk Community.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jun 2021 15:15:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/compare-6-months-ago-to-start-date-can-be-any-specific-date/m-p/556542#M6195</guid>
      <dc:creator>Micheal_S</dc:creator>
      <dc:date>2021-06-21T15:15:09Z</dc:date>
    </item>
    <item>
      <title>Re: compare 6 months ago to start date(can be any specific date)</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/compare-6-months-ago-to-start-date-can-be-any-specific-date/m-p/556549#M6196</link>
      <description>&lt;P&gt;Playing around with some results it doesn't seem to affect anything, but I was also concerned about the ."-01" in this line from your original post, the resulting output of the strftime() function wouldn't fit the format.&amp;nbsp; You'd end up with something like 2021-03-22-01.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval start_date=strptime(strftime(start_date1,"%Y-%m-%d")."-01","%Y-%m-%d")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jun 2021 15:44:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/compare-6-months-ago-to-start-date-can-be-any-specific-date/m-p/556549#M6196</guid>
      <dc:creator>Micheal_S</dc:creator>
      <dc:date>2021-06-21T15:44:20Z</dc:date>
    </item>
  </channel>
</rss>

