<?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: How to expand the dates between two dates? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-expand-the-dates-between-two-dates/m-p/371497#M162058</link>
    <description>&lt;P&gt;hey try this run anywhere search&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval SDate="3/11/2018",EDate="3/19/2018" 
| rex field=SDate "(?&amp;lt;sdate&amp;gt;\d+\/\d+)" 
| rex field=EDate "(?&amp;lt;edate&amp;gt;\d+\/\d+)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In your environment, you should write&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;your_base_Search&amp;gt; | rex field=SDate "(?&amp;lt;sdate&amp;gt;\d+\/\d+)" | rex field=EDate "(?&amp;lt;edate&amp;gt;\d+\/\d+)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;let me know if this helps!&lt;/P&gt;</description>
    <pubDate>Thu, 22 Mar 2018 09:37:30 GMT</pubDate>
    <dc:creator>mayurr98</dc:creator>
    <dc:date>2018-03-22T09:37:30Z</dc:date>
    <item>
      <title>How to expand the dates between two dates?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-expand-the-dates-between-two-dates/m-p/371495#M162056</link>
      <description>&lt;P&gt;I want to display the date between two date range EX. 3/11 -3/19&lt;/P&gt;

&lt;P&gt;Field : SDate= 3/11/2018 EDate=3/19/2018&lt;/P&gt;

&lt;P&gt;I need the output as 3/11 , 3/12, 3/13.....3/19.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Mar 2018 08:22:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-expand-the-dates-between-two-dates/m-p/371495#M162056</guid>
      <dc:creator>Sankar_g30</dc:creator>
      <dc:date>2018-03-22T08:22:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to expand the dates between two dates?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-expand-the-dates-between-two-dates/m-p/371496#M162057</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Use gentimes for that:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| gentimes start=3/11/2018 end=3/19/2018 increment=1d
| eval dates = strftime(starttime, "%m/%d")
| table dates
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Output:&lt;/P&gt;

&lt;P&gt;&lt;IMG src="https://i.imgur.com/AXS1gtj.png" alt="alt text" /&gt;&lt;/P&gt;

&lt;P&gt;If you want to get rid of the leading zeros I can show you how to do that too.&lt;/P&gt;

&lt;P&gt;Regards,&lt;BR /&gt;
J&lt;/P&gt;</description>
      <pubDate>Thu, 22 Mar 2018 08:32:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-expand-the-dates-between-two-dates/m-p/371496#M162057</guid>
      <dc:creator>javiergn</dc:creator>
      <dc:date>2018-03-22T08:32:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to expand the dates between two dates?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-expand-the-dates-between-two-dates/m-p/371497#M162058</link>
      <description>&lt;P&gt;hey try this run anywhere search&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval SDate="3/11/2018",EDate="3/19/2018" 
| rex field=SDate "(?&amp;lt;sdate&amp;gt;\d+\/\d+)" 
| rex field=EDate "(?&amp;lt;edate&amp;gt;\d+\/\d+)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In your environment, you should write&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;your_base_Search&amp;gt; | rex field=SDate "(?&amp;lt;sdate&amp;gt;\d+\/\d+)" | rex field=EDate "(?&amp;lt;edate&amp;gt;\d+\/\d+)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;let me know if this helps!&lt;/P&gt;</description>
      <pubDate>Thu, 22 Mar 2018 09:37:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-expand-the-dates-between-two-dates/m-p/371497#M162058</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2018-03-22T09:37:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to expand the dates between two dates?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-expand-the-dates-between-two-dates/m-p/371498#M162059</link>
      <description>&lt;P&gt;@Sankar_g30 please do not forget to accept an answer if you are happy with it&lt;/P&gt;</description>
      <pubDate>Tue, 29 May 2018 10:07:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-expand-the-dates-between-two-dates/m-p/371498#M162059</guid>
      <dc:creator>javiergn</dc:creator>
      <dc:date>2018-05-29T10:07:35Z</dc:date>
    </item>
  </channel>
</rss>

