<?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: Month to date for previous month with current month date in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Month-to-date-for-previous-month-with-current-month-date/m-p/469575#M132133</link>
    <description>&lt;P&gt;Per &lt;A href="https://docs.splunk.com/Documentation/Splunk/8.0.4/SearchReference/SearchTimeModifiers"&gt;https://docs.splunk.com/Documentation/Splunk/8.0.4/SearchReference/SearchTimeModifiers&lt;/A&gt;, try something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=ndx sourcetype=srctp earliest=-1mon@mon latest=-30d@d 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 01 Jun 2020 15:17:05 GMT</pubDate>
    <dc:creator>wmyersas</dc:creator>
    <dc:date>2020-06-01T15:17:05Z</dc:date>
    <item>
      <title>Month to date for previous month with current month date</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Month-to-date-for-previous-month-with-current-month-date/m-p/469574#M132132</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have to extract the sum of particular search output from my query and the same needs to be compared with previous month to date.&lt;BR /&gt;
For example, consider today is June 15th, and i have the sum as 150000 for last 15 days, and now i would like to get the same sum for previous month, ie., till May 1-15th using the same query. Could someone suggest on this.&lt;/P&gt;

&lt;P&gt;I have tried the eval epoch30days_ago=relative_time(now(), "-28d@d" ), but this is not giving the accurate data.&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 05:36:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Month-to-date-for-previous-month-with-current-month-date/m-p/469574#M132132</guid>
      <dc:creator>prakashmca05</dc:creator>
      <dc:date>2020-09-30T05:36:13Z</dc:date>
    </item>
    <item>
      <title>Re: Month to date for previous month with current month date</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Month-to-date-for-previous-month-with-current-month-date/m-p/469575#M132133</link>
      <description>&lt;P&gt;Per &lt;A href="https://docs.splunk.com/Documentation/Splunk/8.0.4/SearchReference/SearchTimeModifiers"&gt;https://docs.splunk.com/Documentation/Splunk/8.0.4/SearchReference/SearchTimeModifiers&lt;/A&gt;, try something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=ndx sourcetype=srctp earliest=-1mon@mon latest=-30d@d 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 01 Jun 2020 15:17:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Month-to-date-for-previous-month-with-current-month-date/m-p/469575#M132133</guid>
      <dc:creator>wmyersas</dc:creator>
      <dc:date>2020-06-01T15:17:05Z</dc:date>
    </item>
    <item>
      <title>Re: Month to date for previous month with current month date</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Month-to-date-for-previous-month-with-current-month-date/m-p/469576#M132134</link>
      <description>&lt;P&gt;It works with slight modification as below.&lt;/P&gt;

&lt;P&gt;-1mon@mon&lt;BR /&gt;
    &lt;LATEST&gt;-30d@day&lt;/LATEST&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jun 2020 15:33:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Month-to-date-for-previous-month-with-current-month-date/m-p/469576#M132134</guid>
      <dc:creator>prakashmca05</dc:creator>
      <dc:date>2020-06-04T15:33:33Z</dc:date>
    </item>
    <item>
      <title>Re: Month to date for previous month with current month date</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Month-to-date-for-previous-month-with-current-month-date/m-p/469577#M132135</link>
      <description>&lt;P&gt;you're right! put the &lt;CODE&gt;@&lt;/CODE&gt; in the wrong spot &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jun 2020 16:59:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Month-to-date-for-previous-month-with-current-month-date/m-p/469577#M132135</guid>
      <dc:creator>wmyersas</dc:creator>
      <dc:date>2020-06-04T16:59:12Z</dc:date>
    </item>
  </channel>
</rss>

