<?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 Setting earliest_time through Java sdk in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/Setting-earliest-time-through-Java-sdk/m-p/457121#M8305</link>
    <description>&lt;P&gt;i'm using Splunk java sdk to get search result. i want to setup timestamp for my search.&lt;/P&gt;

&lt;P&gt;Args oneshotSearchArgs = new Args(); &lt;BR /&gt;
                        oneshotSearchArgs.put("earliest_time", "2019-02-19T12:00:00.000-07:00"); &lt;BR /&gt;
                    oneshotSearchArgs.put("latest_time", "2019-02-20T12:00:00.000-07:00"); &lt;BR /&gt;
              String oneshotSearchQuery ="search index=app | head 2";&lt;/P&gt;

&lt;P&gt;Instead giving date manually, i want to give &lt;/P&gt;

&lt;P&gt;earliest_time --&amp;gt; 2 days &lt;BR /&gt;
latest_time --&amp;gt; now&lt;/P&gt;

&lt;P&gt;How can i do it?&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 23:49:30 GMT</pubDate>
    <dc:creator>Hunterzz</dc:creator>
    <dc:date>2020-09-29T23:49:30Z</dc:date>
    <item>
      <title>Setting earliest_time through Java sdk</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Setting-earliest-time-through-Java-sdk/m-p/457121#M8305</link>
      <description>&lt;P&gt;i'm using Splunk java sdk to get search result. i want to setup timestamp for my search.&lt;/P&gt;

&lt;P&gt;Args oneshotSearchArgs = new Args(); &lt;BR /&gt;
                        oneshotSearchArgs.put("earliest_time", "2019-02-19T12:00:00.000-07:00"); &lt;BR /&gt;
                    oneshotSearchArgs.put("latest_time", "2019-02-20T12:00:00.000-07:00"); &lt;BR /&gt;
              String oneshotSearchQuery ="search index=app | head 2";&lt;/P&gt;

&lt;P&gt;Instead giving date manually, i want to give &lt;/P&gt;

&lt;P&gt;earliest_time --&amp;gt; 2 days &lt;BR /&gt;
latest_time --&amp;gt; now&lt;/P&gt;

&lt;P&gt;How can i do it?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 23:49:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Setting-earliest-time-through-Java-sdk/m-p/457121#M8305</guid>
      <dc:creator>Hunterzz</dc:creator>
      <dc:date>2020-09-29T23:49:30Z</dc:date>
    </item>
    <item>
      <title>Re: Setting earliest_time through Java sdk</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Setting-earliest-time-through-Java-sdk/m-p/457122#M8306</link>
      <description>&lt;P&gt;@Hunterzz &lt;/P&gt;

&lt;P&gt;You can specify Splunk time modifier in oneshot arguments. Please check below link for Splunk time modifier  example.&lt;/P&gt;

&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/7.2.5/Search/Specifytimemodifiersinyoursearch#Examples_of_relative_time_modifiers"&gt;https://docs.splunk.com/Documentation/Splunk/7.2.5/Search/Specifytimemodifiersinyoursearch#Examples_of_relative_time_modifiers&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Please check &lt;STRONG&gt;To run a basic oneshot search and display results&lt;/STRONG&gt;&lt;BR /&gt;
 in  &lt;A href="http://dev.splunk.com/view/java-sdk/SP-CAAAEHQ"&gt;http://dev.splunk.com/view/java-sdk/SP-CAAAEHQ&lt;/A&gt; .&lt;/P&gt;</description>
      <pubDate>Thu, 04 Apr 2019 10:14:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Setting-earliest-time-through-Java-sdk/m-p/457122#M8306</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2019-04-04T10:14:29Z</dc:date>
    </item>
  </channel>
</rss>

