Getting Data In

CSV: Timestamp incorrect, how do I fix?

danfinan
Explorer

Hi guys,

I have a very simple csv file, with three columns, two of which are 'date' and 'time'. I can not (for love nor money) get the timestamp to be correct. Here is a row from my csv file:

0W4K 09-04 03/10/2019

09-04 is 09:04am and the date is obviously the date.

The timestamp is the last time the CSV was modified and I'm trying to get Splunk to indenitfy the correct time from the CSV file based on its current format.

Any help would be greatly appreciated, thank you!

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi danfinan,
try something like this in your props.conf:

[your_sourcetype]
TIME_PREFIX = ^\w+\s+
TIME_FORMAT = %H-%M %d/%m/%Y
SHOULD_LINEMERGE = false

Bye.
Giuseppe

0 Karma

richgalloway
SplunkTrust
SplunkTrust

The time format string would be "%H-%M %m/%d/%Y", but we need more information to tell you how to use it. What is the query that uses this CSV?

---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

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

Combine Multiline Logs into a Single Event with SOCK: a Step-by-Step Guide for ...

Combine multiline logs into a single event with SOCK - a step-by-step guide for newbies Olga Malita The ...