Getting Data In

_time or time not being populated correctly from a CSV file

clintla
Contributor

Having issues getting time right.
My time is currently being populated by file creation time & not the 2nd column of the CSV file.

In troubleshooting, I've extracted time out a couple times.
DATE_ 2016-08-25 01:05:00 PM
extractDATE 2016-08-25 01:05:00 PM

but even though in props.conf, I've tried to assign either to the time value- it doesn't seem to have an effect after Splunk restart and addition of new files.

Props shows
TIMESTAMP_FIELDS = extractDATE

the time shows as
Time _time 2016-08-25T13:39:02.000-07:00

I've successfully assigned timestamp, but that doesn't show well in a timechart.
I've looked for other ways to assign @ search time such as an eval command to assign time, but that clobbers the time all together

Is there a manual way to assign time to a field in the GUI or at search time? hard to figure out what I'm doing wrong here.

1 Solution

clintla
Contributor

I'm good.. used this command to re-assign that doesnt clobber the time

eval _time =strptime(timestamp,"%Y-%m-%d %H:%M:%S %P")

View solution in original post

clintla
Contributor

I'm good.. used this command to re-assign that doesnt clobber the time

eval _time =strptime(timestamp,"%Y-%m-%d %H:%M:%S %P")

Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...