<?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: Splunk DB Connect 1: How to parse a dbquery search string to convert Unix timestamps to a readable format and create a timechart? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-DB-Connect-1-How-to-parse-a-dbquery-search-string-to/m-p/205479#M98778</link>
    <description>&lt;P&gt;This was it! Thank you kind sir.&lt;/P&gt;</description>
    <pubDate>Thu, 09 Jun 2016 16:34:36 GMT</pubDate>
    <dc:creator>jtracy</dc:creator>
    <dc:date>2016-06-09T16:34:36Z</dc:date>
    <item>
      <title>Splunk DB Connect 1: How to parse a dbquery search string to convert Unix timestamps to a readable format and create a timechart?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-DB-Connect-1-How-to-parse-a-dbquery-search-string-to/m-p/205477#M98776</link>
      <description>&lt;P&gt;I have a string like this;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| dbquery MYDATABASE "Select trunc(ph.x_rqst_date) bp_date,count(ph.objid) bpcount,ph.x_ics_rcode _code,
 X_AUTH_RESPONSE paymen_code,ph.x_payment_type type
 from x_program_purch_hdr ph    
 where x_rqst_type='CREDITCARD_PURCH'
 AND ph.x_payment_type IN ('ENROLLMENT','RECURRING')
 and ph.x_rqst_date &amp;gt;= Trunc(sysdate)-1
 and ph.x_rqst_date &amp;lt; Trunc(sysdate)
 GROUP BY trunc(ph.x_rqst_date),ph.x_ics_rcode,X_AUTH_RESPONSE,ph.x_payment_type"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But I cannot parse this query with things like &lt;CODE&gt;|timechart count by code limit=25&lt;/CODE&gt;. Am I missing something? I want to convert all the unreadable unix timestamps to readable, and make a timechart.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jun 2016 16:01:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-DB-Connect-1-How-to-parse-a-dbquery-search-string-to/m-p/205477#M98776</guid>
      <dc:creator>jtracy</dc:creator>
      <dc:date>2016-06-09T16:01:34Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk DB Connect 1: How to parse a dbquery search string to convert Unix timestamps to a readable format and create a timechart?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-DB-Connect-1-How-to-parse-a-dbquery-search-string-to/m-p/205478#M98777</link>
      <description>&lt;P&gt;Timechart relies on having a _time field for your data.  If your date field is already in epoch format, just rename the column with the date to _time:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rename bp_date as _time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then try adding your timechart after that.  The alternative would be to name the column within your query:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Select trunc(ph.x_rqst_date) _time
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 09 Jun 2016 16:21:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-DB-Connect-1-How-to-parse-a-dbquery-search-string-to/m-p/205478#M98777</guid>
      <dc:creator>justinatpnnl</dc:creator>
      <dc:date>2016-06-09T16:21:35Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk DB Connect 1: How to parse a dbquery search string to convert Unix timestamps to a readable format and create a timechart?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-DB-Connect-1-How-to-parse-a-dbquery-search-string-to/m-p/205479#M98778</link>
      <description>&lt;P&gt;This was it! Thank you kind sir.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jun 2016 16:34:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-DB-Connect-1-How-to-parse-a-dbquery-search-string-to/m-p/205479#M98778</guid>
      <dc:creator>jtracy</dc:creator>
      <dc:date>2016-06-09T16:34:36Z</dc:date>
    </item>
  </channel>
</rss>

