All Apps and Add-ons

Splunk DB Connect: How do I use epoch time when extracting the data time information?

alexwade13
Engager

Hi, I'm trying to figure out what to put in the DateTime format spot when set the SQL query and setting a rising column. The test says "Specify the format to extract the date time information (eg: dd/MM/yyyy HH:mm:ss.SSS) or cast the column to timestamp manually in your query." How do I get it to use Epoch time instead? Also, there are 3 milliseconds after the epoch time. I know the time format in props would be %s%3N, but that is not applicable here. Thanks!

0 Karma

bambarit
Explorer

?have you resolved epoch timestamp?

0 Karma

bambarit
Explorer

have you resolved epoch timestamp?

0 Karma

sshres5
Communicator

I got this working by using the following:
SELECT CAST(date '1970-01-01' + (1/24/60/60/1000) *epoch_column AS timestamp) AS date_time, epoch_column

0 Karma

splunk_zen
Builder

Any solution to this?
Shouldn't DB connect actually prefer an epoch rising column rather than a human converted format as it's constantly evaluating for a higher value?

0 Karma

splunk_zen
Builder

Seems it just needs to be a DATETIME type and this goes away

0 Karma

EmEdwards
Path Finder

I am using a new version of DB connect 3.1.1 and seems even though I have a datetime datatype from SQL it still wont accept the column and requests a format.
I can't seem to get it to work.

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...