<?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 do I compare the log date with the time picker date? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-compare-the-log-date-with-the-time-picker-date/m-p/400807#M116083</link>
    <description>&lt;P&gt;Hi @kamlesh_vaghela ,&lt;/P&gt;

&lt;P&gt;you can find the same at below link.&lt;/P&gt;

&lt;P&gt;&lt;A href="https://answers.splunk.com/answers/685745/how-do-you-get-tabular-event-with-field-value-pair.html"&gt;https://answers.splunk.com/answers/685745/how-do-you-get-tabular-event-with-field-value-pair.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;CREATE_TIME and TIMESTAMP is different times.&lt;/P&gt;</description>
    <pubDate>Wed, 26 Sep 2018 17:45:12 GMT</pubDate>
    <dc:creator>twh1</dc:creator>
    <dc:date>2018-09-26T17:45:12Z</dc:date>
    <item>
      <title>How do I compare the log date with the time picker date?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-compare-the-log-date-with-the-time-picker-date/m-p/400805#M116081</link>
      <description>&lt;P&gt;I want to check the records for which CREATE_TIME matches based on my date selection from time picker control. Currently, I am using the below query, which is always checking only for today's date.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=os_na sourcetype="oracle_os:healthcheck" "ADR Home =" | multikv | table HOSTNAME INCIDENT_ID PROBLEM_KEY CREATE_TIME TIMESTAMP | dedup INCIDENT_ID | eval create_day=substr(CREATE_TIME, 1, 10) | eval now_day = strftime(now(), "%m/%d/%Y") | where INCIDENT_ID!=" " AND create_day==now_day
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Could you please help me to get desired result.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Sep 2018 17:34:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-compare-the-log-date-with-the-time-picker-date/m-p/400805#M116081</guid>
      <dc:creator>twh1</dc:creator>
      <dc:date>2018-09-26T17:34:01Z</dc:date>
    </item>
    <item>
      <title>Re: How do I compare the log date with the time picker date?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-compare-the-log-date-with-the-time-picker-date/m-p/400806#M116082</link>
      <description>&lt;P&gt;@twh1&lt;/P&gt;

&lt;P&gt;Can you please share sample data for &lt;CODE&gt;| table HOSTNAME INCIDENT_ID PROBLEM_KEY CREATE_TIME TIMESTAMP&lt;/CODE&gt;?&lt;/P&gt;

&lt;P&gt;Do CREATE_TIME and  TIMESTAMP be same?&lt;/P&gt;</description>
      <pubDate>Wed, 26 Sep 2018 17:37:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-compare-the-log-date-with-the-time-picker-date/m-p/400806#M116082</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2018-09-26T17:37:32Z</dc:date>
    </item>
    <item>
      <title>Re: How do I compare the log date with the time picker date?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-compare-the-log-date-with-the-time-picker-date/m-p/400807#M116083</link>
      <description>&lt;P&gt;Hi @kamlesh_vaghela ,&lt;/P&gt;

&lt;P&gt;you can find the same at below link.&lt;/P&gt;

&lt;P&gt;&lt;A href="https://answers.splunk.com/answers/685745/how-do-you-get-tabular-event-with-field-value-pair.html"&gt;https://answers.splunk.com/answers/685745/how-do-you-get-tabular-event-with-field-value-pair.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;CREATE_TIME and TIMESTAMP is different times.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Sep 2018 17:45:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-compare-the-log-date-with-the-time-picker-date/m-p/400807#M116083</guid>
      <dc:creator>twh1</dc:creator>
      <dc:date>2018-09-26T17:45:12Z</dc:date>
    </item>
    <item>
      <title>Re: How do I compare the log date with the time picker date?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-compare-the-log-date-with-the-time-picker-date/m-p/400808#M116084</link>
      <description>&lt;P&gt;Hi @twh1&lt;/P&gt;

&lt;P&gt;As per your requirement to filter event on the basis of selected time picker which needs to be applied on &lt;CODE&gt;CREATE_TIME&lt;/CODE&gt; field I have used &lt;CODE&gt;addinfo&lt;/CODE&gt;  command.  &lt;A href="http://docs.splunk.com/Documentation/Splunk/7.1.3/SearchReference/Addinfo"&gt;http://docs.splunk.com/Documentation/Splunk/7.1.3/SearchReference/Addinfo&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Please try this?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;YouR_SEARCH
| eval created_time=strptime(CREATE_TIME,"%Y-%m-%d %H:%M:%S.%N") 
| addinfo 
| where (info_max_time="+Infinity" OR (created_time&amp;lt;info_max_time AND created_time&amp;gt;info_min_time))
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;My sample search.&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval _raw="
INCIDENT_ID          PROBLEM_KEY                                                 CREATE_TIME                              
 -------------------- ----------------------------------------------------------- ---------------------------------------- 
 102753               ORA 15064                                                   2018-05-24 15:38:50.242000 -04:00       
 107689               ORA 29740                                                   2018-05-24 17:04:00.414000 -04:00       
 112801               ORA 32701                                                   2018-05-24 20:59:14.420000 -04:00 
 " 
| multikv 
| eval created_time=strptime(CREATE_TIME,"%Y-%m-%d %H:%M:%S.%N") 
| addinfo 
| where (info_max_time="+Infinity" OR (created_time&amp;lt;info_max_time AND created_time&amp;gt;info_min_time))
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 26 Sep 2018 17:58:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-compare-the-log-date-with-the-time-picker-date/m-p/400808#M116084</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2018-09-26T17:58:51Z</dc:date>
    </item>
    <item>
      <title>Re: How do I compare the log date with the time picker date?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-compare-the-log-date-with-the-time-picker-date/m-p/400809#M116085</link>
      <description>&lt;P&gt;Hi @kamlesh_vaghela ,&lt;BR /&gt;
I tried above option and selected date range as 24th May but not getting any result. &lt;/P&gt;</description>
      <pubDate>Thu, 27 Sep 2018 13:09:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-compare-the-log-date-with-the-time-picker-date/m-p/400809#M116085</guid>
      <dc:creator>twh1</dc:creator>
      <dc:date>2018-09-27T13:09:24Z</dc:date>
    </item>
    <item>
      <title>Re: How do I compare the log date with the time picker date?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-compare-the-log-date-with-the-time-picker-date/m-p/400810#M116086</link>
      <description>&lt;P&gt;Hi @twh1&lt;/P&gt;

&lt;P&gt;if you executing my given search then you have to select &lt;CODE&gt;2018-05-24&lt;/CODE&gt; date to get data.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Sep 2018 13:21:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-compare-the-log-date-with-the-time-picker-date/m-p/400810#M116086</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2018-09-27T13:21:41Z</dc:date>
    </item>
    <item>
      <title>Re: How do I compare the log date with the time picker date?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-compare-the-log-date-with-the-time-picker-date/m-p/400811#M116087</link>
      <description>&lt;P&gt;Hi @kamlesh_vaghela ,&lt;BR /&gt;
I have selected the date range for which I have data, but still no data coming. (i.e. create date have data on 24th May to 27th May and I selected date as 24th May 00:00 - 24:00)&lt;/P&gt;</description>
      <pubDate>Thu, 27 Sep 2018 16:29:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-compare-the-log-date-with-the-time-picker-date/m-p/400811#M116087</guid>
      <dc:creator>twh1</dc:creator>
      <dc:date>2018-09-27T16:29:24Z</dc:date>
    </item>
    <item>
      <title>Re: How do I compare the log date with the time picker date?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-compare-the-log-date-with-the-time-picker-date/m-p/400812#M116088</link>
      <description>&lt;P&gt;Do you need earliest and latest token values of Time range picker to be used as filter for CREATE_TIME?&lt;/P&gt;</description>
      <pubDate>Wed, 10 Oct 2018 09:07:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-compare-the-log-date-with-the-time-picker-date/m-p/400812#M116088</guid>
      <dc:creator>varun8159</dc:creator>
      <dc:date>2018-10-10T09:07:17Z</dc:date>
    </item>
    <item>
      <title>Re: How do I compare the log date with the time picker date?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-compare-the-log-date-with-the-time-picker-date/m-p/400813#M116089</link>
      <description>&lt;P&gt;Yes @varun8159 . I want to compare if date date range is selected as 24th May to 25th May. I want to display the records, for which we have CREATE_TIME in between 24th May to 25th May.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Oct 2018 11:16:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-compare-the-log-date-with-the-time-picker-date/m-p/400813#M116089</guid>
      <dc:creator>twh1</dc:creator>
      <dc:date>2018-10-11T11:16:57Z</dc:date>
    </item>
  </channel>
</rss>

