<?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: DB Connect TimeStamp Format in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/DB-Connect-TimeStamp-Format/m-p/78023#M181604</link>
    <description>&lt;P&gt;After trying dozens on Java SimpleDateFormat around, once I got confirmation on this Post here that this timestamp.format would be recognized&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;timestamp.format = yyyy-MM-dd'T'HH:mm:ss.SSSZ
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Managed to get UTC dates properly indexed with this snipped on TSQL:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;FORMAT(Time,'yyyy-MM-ddTHH:mm:ss.fff')+REPLACE(RIGHT(CONVERT(datetimeoffset,Time,26),6),':','')
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I'm on DB Connect 3.1.3, we still can't trust props.conf ( DBX-4019 and DBX-4021 .... )&lt;/P&gt;</description>
    <pubDate>Fri, 05 Apr 2019 14:38:43 GMT</pubDate>
    <dc:creator>nunoaragao</dc:creator>
    <dc:date>2019-04-05T14:38:43Z</dc:date>
    <item>
      <title>DB Connect TimeStamp Format</title>
      <link>https://community.splunk.com/t5/Splunk-Search/DB-Connect-TimeStamp-Format/m-p/78018#M181599</link>
      <description>&lt;P&gt;Has anyone successfully provided TimeStamp.Format in DB Connect for DateTimeOffset type (SqlSever)? The time is in UTC and looks like this (&lt;STRONG&gt;2013-05-15 04:26:24.249 -05:00&lt;/STRONG&gt;).&lt;/P&gt;

&lt;P&gt;I know I can convert it into DateTime type with proper format and it will work, but I am curious if I can simply provide a format that will work with time zone. One thing I notice, if I don't provide any format and choose not to output timestamp, Splunk still parse it correctly (in _time) with warning. It could be it just ignore the rest of time zone info and leave date time part which looks right. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;output.timestamp = 0
output.timestamp.column = TimeStamp
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;dbx2941:WARN:ResultSetOutputPayload - Unrecognized timestamp format:'2013-05-15 04:26:24.249 -05:00'&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jun 2013 17:01:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/DB-Connect-TimeStamp-Format/m-p/78018#M181599</guid>
      <dc:creator>dan60201</dc:creator>
      <dc:date>2013-06-27T17:01:00Z</dc:date>
    </item>
    <item>
      <title>Re: DB Connect TimeStamp Format</title>
      <link>https://community.splunk.com/t5/Splunk-Search/DB-Connect-TimeStamp-Format/m-p/78019#M181600</link>
      <description>&lt;P&gt;Caveat: I haven't tested this as I don't have a SqlServer instance with time stamps of this format.&lt;/P&gt;

&lt;P&gt;The usual kind of &lt;CODE&gt;props.conf&lt;/CODE&gt; entries should apply, though. I'd try&lt;/P&gt;

&lt;P&gt;%Y-%m-%d %H:%M:%S.%3N %z&lt;/P&gt;

&lt;P&gt;The %z &lt;EM&gt;may&lt;/EM&gt; be tripped up by the : in the zone specification (though I haven't tried), so you may have to ignore the offset from the data, and apply a manual TZ setting in the props.conf entry for the sourcetype defined by this data input.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Aug 2013 15:31:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/DB-Connect-TimeStamp-Format/m-p/78019#M181600</guid>
      <dc:creator>sowings</dc:creator>
      <dc:date>2013-08-06T15:31:38Z</dc:date>
    </item>
    <item>
      <title>Re: DB Connect TimeStamp Format</title>
      <link>https://community.splunk.com/t5/Splunk-Search/DB-Connect-TimeStamp-Format/m-p/78020#M181601</link>
      <description>&lt;P&gt;I struggled with this today.  I eventually made it work by using&lt;BR /&gt;
&lt;PRE&gt;&lt;CODE&gt;convert(VARCHAR(35),TimeStamp,126) + '-0000' as TimeStampWtz&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;
In addition, I think you have to make sure to output the timestamp.  The pertinent components to inputs.conf:&lt;BR /&gt;
&lt;PRE&gt;&lt;CODE&gt;&lt;BR /&gt;
output.format = kv&lt;BR /&gt;
output.timestamp = 1&lt;BR /&gt;
output.timestamp.column = TimeStampWtz&lt;BR /&gt;
output.timestamp.format = yyyy-MM-dd'T'HH:mm:ss.SSSZ&lt;BR /&gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;
The format is specified in &lt;A href="http://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html"&gt;Java SimpleDateFormat&lt;/A&gt;, though it doesn't seem to be completely implemented.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Aug 2013 23:44:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/DB-Connect-TimeStamp-Format/m-p/78020#M181601</guid>
      <dc:creator>jswanson</dc:creator>
      <dc:date>2013-08-07T23:44:52Z</dc:date>
    </item>
    <item>
      <title>Re: DB Connect TimeStamp Format</title>
      <link>https://community.splunk.com/t5/Splunk-Search/DB-Connect-TimeStamp-Format/m-p/78021#M181602</link>
      <description>&lt;P&gt;Hi JSwanson, I'm also having trouble with my SQLite database and db connect. My time format I enter is using:&lt;/P&gt;

&lt;P&gt;CREATE TABLE bat0 (tm TEXT, value float, x TEXT, date TEXT);&lt;/P&gt;

&lt;P&gt;First, I'm unsure if I need to do anything here but reading the notes, that should work. My format is YYYY-MM-DD HH:MM:SSS and was wondering if/how db connect can pick that up when I search?&lt;/P&gt;

&lt;P&gt;And is this edited in the props.conf file?&lt;/P&gt;

&lt;P&gt;Thanks in advance for your help! Chris&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2013 09:49:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/DB-Connect-TimeStamp-Format/m-p/78021#M181602</guid>
      <dc:creator>cpbridges</dc:creator>
      <dc:date>2013-08-08T09:49:35Z</dc:date>
    </item>
    <item>
      <title>Re: DB Connect TimeStamp Format</title>
      <link>https://community.splunk.com/t5/Splunk-Search/DB-Connect-TimeStamp-Format/m-p/78022#M181603</link>
      <description>&lt;P&gt;Can you post an example of the timestamp?  The GUI seemed pretty helpful in setting it up.&lt;/P&gt;

&lt;P&gt;Yes, usually this kind of thing is handled by props.conf, but in this case you'll need to edit the inputs.conf.  In my case it's &lt;CODE&gt;/opt/splunk/etc/apps/dbx/local/inputs.conf&lt;/CODE&gt;.  &lt;/P&gt;

&lt;P&gt;I found that some things in the &lt;A href="http://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html"&gt;Java SimpleDateFormat&lt;/A&gt; aren't implemented, so make sure to check your &lt;CODE&gt;&lt;SPLUNKDIR&gt;var/log/splunk/dbx.log&lt;/SPLUNKDIR&gt;&lt;/CODE&gt; for errors.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2013 15:46:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/DB-Connect-TimeStamp-Format/m-p/78022#M181603</guid>
      <dc:creator>jswanson</dc:creator>
      <dc:date>2013-08-08T15:46:24Z</dc:date>
    </item>
    <item>
      <title>Re: DB Connect TimeStamp Format</title>
      <link>https://community.splunk.com/t5/Splunk-Search/DB-Connect-TimeStamp-Format/m-p/78023#M181604</link>
      <description>&lt;P&gt;After trying dozens on Java SimpleDateFormat around, once I got confirmation on this Post here that this timestamp.format would be recognized&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;timestamp.format = yyyy-MM-dd'T'HH:mm:ss.SSSZ
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Managed to get UTC dates properly indexed with this snipped on TSQL:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;FORMAT(Time,'yyyy-MM-ddTHH:mm:ss.fff')+REPLACE(RIGHT(CONVERT(datetimeoffset,Time,26),6),':','')
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I'm on DB Connect 3.1.3, we still can't trust props.conf ( DBX-4019 and DBX-4021 .... )&lt;/P&gt;</description>
      <pubDate>Fri, 05 Apr 2019 14:38:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/DB-Connect-TimeStamp-Format/m-p/78023#M181604</guid>
      <dc:creator>nunoaragao</dc:creator>
      <dc:date>2019-04-05T14:38:43Z</dc:date>
    </item>
  </channel>
</rss>

