<?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 Custome Time picker in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Custome-Time-picker/m-p/428531#M171641</link>
    <description>&lt;P&gt;in below query its showing time picker data or time as per time picker. but i want if i select last 30 days in time picker  it should show date of last 30 days ,if i select  date range it should be show same date in my coloum and if select last  last month it should be showing date on start date &lt;/P&gt;

&lt;P&gt;tsest _time&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;input type="time" token="timepicker"&amp;gt;
  &amp;lt;label&amp;gt;&amp;lt;/label&amp;gt;
  &amp;lt;default&amp;gt;
    &amp;lt;earliest&amp;gt;-24h@h&amp;lt;/earliest&amp;gt;
    &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
  &amp;lt;/default&amp;gt;
&amp;lt;/input&amp;gt;


&amp;lt;panel&amp;gt;
  &amp;lt;table&amp;gt;
    &amp;lt;search&amp;gt;
      &amp;lt;query&amp;gt;| makeresults |eval start_date="$timepicker.earliest$", end_date="$timepicker.latest$"|table start_date,end_date&amp;lt;/query&amp;gt;
      &amp;lt;earliest&amp;gt;$timepicker.earliest$&amp;lt;/earliest&amp;gt;
      &amp;lt;latest&amp;gt;$timepicker.latest$&amp;lt;/latest&amp;gt;
      &amp;lt;sampleRatio&amp;gt;1&amp;lt;/sampleRatio&amp;gt;
    &amp;lt;/search&amp;gt;
    &amp;lt;option name="count"&amp;gt;20&amp;lt;/option&amp;gt;
    &amp;lt;option name="dataOverlayMode"&amp;gt;none&amp;lt;/option&amp;gt;
    &amp;lt;option name="drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
    &amp;lt;option name="percentagesRow"&amp;gt;false&amp;lt;/option&amp;gt;
    &amp;lt;option name="rowNumbers"&amp;gt;false&amp;lt;/option&amp;gt;
    &amp;lt;option name="totalsRow"&amp;gt;false&amp;lt;/option&amp;gt;
    &amp;lt;option name="wrap"&amp;gt;true&amp;lt;/option&amp;gt;
  &amp;lt;/table&amp;gt;
&amp;lt;/panel&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sun, 28 Apr 2019 20:52:28 GMT</pubDate>
    <dc:creator>abhishekdubey00</dc:creator>
    <dc:date>2019-04-28T20:52:28Z</dc:date>
    <item>
      <title>Custome Time picker</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Custome-Time-picker/m-p/428531#M171641</link>
      <description>&lt;P&gt;in below query its showing time picker data or time as per time picker. but i want if i select last 30 days in time picker  it should show date of last 30 days ,if i select  date range it should be show same date in my coloum and if select last  last month it should be showing date on start date &lt;/P&gt;

&lt;P&gt;tsest _time&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;input type="time" token="timepicker"&amp;gt;
  &amp;lt;label&amp;gt;&amp;lt;/label&amp;gt;
  &amp;lt;default&amp;gt;
    &amp;lt;earliest&amp;gt;-24h@h&amp;lt;/earliest&amp;gt;
    &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
  &amp;lt;/default&amp;gt;
&amp;lt;/input&amp;gt;


&amp;lt;panel&amp;gt;
  &amp;lt;table&amp;gt;
    &amp;lt;search&amp;gt;
      &amp;lt;query&amp;gt;| makeresults |eval start_date="$timepicker.earliest$", end_date="$timepicker.latest$"|table start_date,end_date&amp;lt;/query&amp;gt;
      &amp;lt;earliest&amp;gt;$timepicker.earliest$&amp;lt;/earliest&amp;gt;
      &amp;lt;latest&amp;gt;$timepicker.latest$&amp;lt;/latest&amp;gt;
      &amp;lt;sampleRatio&amp;gt;1&amp;lt;/sampleRatio&amp;gt;
    &amp;lt;/search&amp;gt;
    &amp;lt;option name="count"&amp;gt;20&amp;lt;/option&amp;gt;
    &amp;lt;option name="dataOverlayMode"&amp;gt;none&amp;lt;/option&amp;gt;
    &amp;lt;option name="drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
    &amp;lt;option name="percentagesRow"&amp;gt;false&amp;lt;/option&amp;gt;
    &amp;lt;option name="rowNumbers"&amp;gt;false&amp;lt;/option&amp;gt;
    &amp;lt;option name="totalsRow"&amp;gt;false&amp;lt;/option&amp;gt;
    &amp;lt;option name="wrap"&amp;gt;true&amp;lt;/option&amp;gt;
  &amp;lt;/table&amp;gt;
&amp;lt;/panel&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 28 Apr 2019 20:52:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Custome-Time-picker/m-p/428531#M171641</guid>
      <dc:creator>abhishekdubey00</dc:creator>
      <dc:date>2019-04-28T20:52:28Z</dc:date>
    </item>
    <item>
      <title>Re: Custome Time picker</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Custome-Time-picker/m-p/428532#M171642</link>
      <description>&lt;P&gt;Hi.&lt;/P&gt;

&lt;P&gt;If you are looking to display the date, you can do the following:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults |stats earliest(_time) as start_date, latest(_time) as end_date 
|eval start_date=strftime(start_date, "%D"), end_date=strftime(end_date, "%D")
|table start_date,end_date
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 29 Apr 2019 00:26:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Custome-Time-picker/m-p/428532#M171642</guid>
      <dc:creator>nvanderwalt_spl</dc:creator>
      <dc:date>2019-04-29T00:26:32Z</dc:date>
    </item>
    <item>
      <title>Re: Custome Time picker</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Custome-Time-picker/m-p/428533#M171643</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;As per my understanding, I have designed the below query which prints the start date and end date according to the date selected in the time picker,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults
| eval start_date="$timepicker.earliest$", end_date="$timepicker.latest$"
| eval x = if(isnum(start_date),start_date,relative_time(now(), start_date))
| eval y = if(isnum(end_date),end_date,case(end_date == "now", now(), end_date == "", now(), 1=1,relative_time(now(), end_date)))
| convert timeformat="%d-%m-%Y %H:%M:%S" ctime(x) AS StartDate
| convert timeformat="%d-%m-%Y %H:%M:%S" ctime(y) AS EndDate
| table StartDate, EndDate
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;It handles all the cases, which are present in the time picker except real time as make result doesn't support that.&lt;BR /&gt;
Supported cases are given below,&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;presets&lt;/LI&gt;
&lt;LI&gt;relative&lt;/LI&gt;
&lt;LI&gt;date range&lt;/LI&gt;
&lt;LI&gt;date and time range&lt;/LI&gt;
&lt;LI&gt;advanced&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;Note:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;In case you select any time range in which the time interval becomes [beginning of time, any time] then the start date will be empty.&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;Happy Splunking!!!&lt;/P&gt;</description>
      <pubDate>Mon, 29 Apr 2019 08:18:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Custome-Time-picker/m-p/428533#M171643</guid>
      <dc:creator>splunk_sv</dc:creator>
      <dc:date>2019-04-29T08:18:02Z</dc:date>
    </item>
    <item>
      <title>Re: Custome Time picker</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Custome-Time-picker/m-p/428534#M171644</link>
      <description>&lt;P&gt;@abhishekdubey006 refer to one of my older answer where based on the time picker selection, the earliest and latest time is set as String Time and Epoch Time (along with duration) using two options. &lt;A href="https://answers.splunk.com/answers/578984/running-one-of-two-searches-based-on-time-picker-s.html"&gt;https://answers.splunk.com/answers/578984/running-one-of-two-searches-based-on-time-picker-s.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Please try out and confirm!&lt;/P&gt;</description>
      <pubDate>Mon, 29 Apr 2019 08:32:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Custome-Time-picker/m-p/428534#M171644</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2019-04-29T08:32:56Z</dc:date>
    </item>
    <item>
      <title>Re: Custome Time picker</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Custome-Time-picker/m-p/428535#M171645</link>
      <description>&lt;P&gt;Is your issue fixed?&lt;/P&gt;</description>
      <pubDate>Wed, 01 May 2019 09:36:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Custome-Time-picker/m-p/428535#M171645</guid>
      <dc:creator>splunk_sv</dc:creator>
      <dc:date>2019-05-01T09:36:12Z</dc:date>
    </item>
  </channel>
</rss>

