Getting Data In

Custom timestamps for csv format?

tamduong16
Contributor

I have the following data from csv file that I want to index into splunk. alt text

I want to set the timestamp to be the highlighted portions but if I select auto for timestamp it will grab the first timestamp that it detects. So I modify the props.conf file to add the following line:
TIME_PREFIX=^([^,]*,){4}
which tell it to take the timestamp after the 4th comma. But for some reasons it grabs the 10-27-2017 along with 00:04:44 but skip the 6:20 PM (which is the actual time that i need). Is there anything I could do to avoid this? Thanks!

0 Karma
1 Solution

Genti
Splunk Employee
Splunk Employee

So, it looks like its grabbing the correct field.
Have you provided a TIME_FORMAT?

Splunk can't recognize on its own that 00:04:44 is NOT the correct time. it is the most common sense thing to be the time.
So you need to provide the CORRECT FORMAT.

something like:

TIME_FORMAT="%m-%d-%Y","%I:%M %p"

View solution in original post

Genti
Splunk Employee
Splunk Employee

So, it looks like its grabbing the correct field.
Have you provided a TIME_FORMAT?

Splunk can't recognize on its own that 00:04:44 is NOT the correct time. it is the most common sense thing to be the time.
So you need to provide the CORRECT FORMAT.

something like:

TIME_FORMAT="%m-%d-%Y","%I:%M %p"

tamduong16
Contributor

work like a champ. thanks!

0 Karma

Genti
Splunk Employee
Splunk Employee

huzzah!!!!

0 Karma
Get Updates on the Splunk Community!

Unlock Database Monitoring with Splunk Observability Cloud

  In today’s fast-paced digital landscape, even minor database slowdowns can disrupt user experiences and ...

Purpose in Action: How Splunk Is Helping Power an Inclusive Future for All

At Cisco, purpose isn’t a tagline—it’s a commitment. Cisco’s FY25 Purpose Report outlines how the company is ...

[Upcoming Webinar] Demo Day: Transforming IT Operations with Splunk

Join us for a live Demo Day at the Cisco Store on January 21st 10:00am - 11:00am PST In the fast-paced world ...