<?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 Why am I getting two different date values in SQL and Splunk? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-two-different-date-values-in-SQL-and-Splunk/m-p/135084#M184713</link>
    <description>&lt;P&gt;Dear All,&lt;/P&gt;

&lt;P&gt;I am connecting to the oracle database and i have multiple tables there so i wanted to merge more than two tables and get the data.&lt;BR /&gt;
I trying to do sql inner join query but its not working for me so what i thought was get all the table data into splunk and merge it in splunk&lt;/P&gt;

&lt;P&gt;Sql Query : sql + ROUND((MAX(PRS.END_DATE) - MIN(PRS.START_DATE)) * 3600,2) AS Run_Time_in_Sec + sql&lt;/P&gt;

&lt;P&gt;I am getting Run_Time_in_sec as one value.&lt;/P&gt;

&lt;P&gt;Splunk Query : search string + stats max(TOTAL) as max_total,max(END_DATE) as max_end_date,min(START_DATE) as min_start_date by ENTERPRISE_ID,RPT_QUEUE_ID | eval Run_Time_in_Sec=(max_end_date-min_start_date)*3600 | table Run_Time_in_sec&lt;/P&gt;

&lt;P&gt;Run_Time_in_sec= some value;&lt;/P&gt;

&lt;P&gt;Sql Query Run_Time_in_sec is different than splunk query Run_Time_in_sec &lt;/P&gt;

&lt;P&gt;Why there is difference in final values&lt;/P&gt;

&lt;P&gt;Can anyone tell me here where i am going wrong&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 17:39:20 GMT</pubDate>
    <dc:creator>gajananh999</dc:creator>
    <dc:date>2020-09-28T17:39:20Z</dc:date>
    <item>
      <title>Why am I getting two different date values in SQL and Splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-two-different-date-values-in-SQL-and-Splunk/m-p/135084#M184713</link>
      <description>&lt;P&gt;Dear All,&lt;/P&gt;

&lt;P&gt;I am connecting to the oracle database and i have multiple tables there so i wanted to merge more than two tables and get the data.&lt;BR /&gt;
I trying to do sql inner join query but its not working for me so what i thought was get all the table data into splunk and merge it in splunk&lt;/P&gt;

&lt;P&gt;Sql Query : sql + ROUND((MAX(PRS.END_DATE) - MIN(PRS.START_DATE)) * 3600,2) AS Run_Time_in_Sec + sql&lt;/P&gt;

&lt;P&gt;I am getting Run_Time_in_sec as one value.&lt;/P&gt;

&lt;P&gt;Splunk Query : search string + stats max(TOTAL) as max_total,max(END_DATE) as max_end_date,min(START_DATE) as min_start_date by ENTERPRISE_ID,RPT_QUEUE_ID | eval Run_Time_in_Sec=(max_end_date-min_start_date)*3600 | table Run_Time_in_sec&lt;/P&gt;

&lt;P&gt;Run_Time_in_sec= some value;&lt;/P&gt;

&lt;P&gt;Sql Query Run_Time_in_sec is different than splunk query Run_Time_in_sec &lt;/P&gt;

&lt;P&gt;Why there is difference in final values&lt;/P&gt;

&lt;P&gt;Can anyone tell me here where i am going wrong&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 17:39:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-two-different-date-values-in-SQL-and-Splunk/m-p/135084#M184713</guid>
      <dc:creator>gajananh999</dc:creator>
      <dc:date>2020-09-28T17:39:20Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I getting two different date values in SQL and Splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-two-different-date-values-in-SQL-and-Splunk/m-p/135085#M184714</link>
      <description>&lt;P&gt;Can anyone help me out here&lt;/P&gt;</description>
      <pubDate>Mon, 22 Sep 2014 18:51:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-two-different-date-values-in-SQL-and-Splunk/m-p/135085#M184714</guid>
      <dc:creator>gajananh999</dc:creator>
      <dc:date>2014-09-22T18:51:21Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I getting two different date values in SQL and Splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-two-different-date-values-in-SQL-and-Splunk/m-p/135086#M184715</link>
      <description>&lt;P&gt;There does not appear to be any timestamp in your queries. Splunk isn't a relational database - it needs a timestamp in order to index data (it's all about &lt;EM&gt;when&lt;/EM&gt; something happens). Besides the &lt;A href="http://docs.splunk.com/Documentation/DBX/1.1.4/DeployDBX/Configuredatabasemonitoring"&gt;DBX documentation&lt;/A&gt;, try the &lt;A href="http://apps.splunk.com/app/1538"&gt;Log File Analysis for Oracle 11g&lt;/A&gt; paper for a primer on getting data from Oracle into Splunk. Also check out &lt;A href="http://answers.splunk.com/answers/148353/dbconnect-changing-the-date-column-value-automatically-to-wrong-date.html#answer-148402"&gt;this post&lt;/A&gt; on date formatting when indexing Oracle data into Splunk.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Sep 2014 03:16:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-two-different-date-values-in-SQL-and-Splunk/m-p/135086#M184715</guid>
      <dc:creator>pmdba</dc:creator>
      <dc:date>2014-09-23T03:16:19Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I getting two different date values in SQL and Splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-two-different-date-values-in-SQL-and-Splunk/m-p/135087#M184716</link>
      <description>&lt;P&gt;Hi @gajananh999&lt;/P&gt;

&lt;P&gt;Did @pmdba's response answer your question? You upvoted it, but you didn't accept it as an answer by clicking on the "Accept" button below the content of their post. Just want to make sure because this question can be marked as solved (as well as any other of your questions with correct answers that haven't been accepted yet) so other people with the same question can find this post much easier. This will prevent people from asking the same questions over and over again. Plus, you both get karma points &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; thanks!&lt;/P&gt;

&lt;P&gt;Patrick&lt;/P&gt;</description>
      <pubDate>Tue, 23 Sep 2014 21:03:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-two-different-date-values-in-SQL-and-Splunk/m-p/135087#M184716</guid>
      <dc:creator>ppablo</dc:creator>
      <dc:date>2014-09-23T21:03:19Z</dc:date>
    </item>
  </channel>
</rss>

