Splunk Search

timestamp for csv

friskyapple
Explorer

I'm just starting out with splunk and have a few CSVs that i'm trying to import. the main one contains library records from the past decade. It originally contained both in and out time, but i've broken it down to be as simple as possible to start with and given it just the initial check out time. The times are all written in the same manner. There's about 134000 entries total. 

game_id,attendee_id,event_id,check_out_time
328,7199,5,2010-09-05 01:32:57
228,7241,5,2010-09-05 01:33:13
379,7327,5,2010-09-05 01:33:51
96,6729,5,2010-09-05 01:34:37

when i go to import this data , the timestamp is always wrong:

splunk.PNG

 I've read through numerous forum posts on splunk and other websites and had multiple people double check the csv; I cannot identify why it struggles to pull the correct timestamp for these events. 

 

Any help will be greatly appreciated. 

0 Karma
1 Solution

bowesmana
SplunkTrust
SplunkTrust

@friskyapple 

You should use capital Y for 4 digit years. Your lower case y is a two digit year.

However, that timestamp is ISO8601 so I would expect it to extract it automatically

You also need to add the MAX_DAYS_AGO setting to allow it to pick up dates in 2010 as by default it will only go back 2000 days. See that setting here

https://docs.splunk.com/Documentation/Splunk/8.0.5/Admin/Propsconf

View solution in original post

to4kawa
Ultra Champion

2010-09-05 01:32:57

%Y-%m-%d %T

not %y

but you don't need time settings. 

splunk can extract time automatically.

bowesmana
SplunkTrust
SplunkTrust

@friskyapple 

You should use capital Y for 4 digit years. Your lower case y is a two digit year.

However, that timestamp is ISO8601 so I would expect it to extract it automatically

You also need to add the MAX_DAYS_AGO setting to allow it to pick up dates in 2010 as by default it will only go back 2000 days. See that setting here

https://docs.splunk.com/Documentation/Splunk/8.0.5/Admin/Propsconf

friskyapple
Explorer

holy cow it worked, thank you!! I cannot express my thanks enough.

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Index This | What travels the world but is also stuck in place?

April 2026 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Discover New Use Cases: Unlock Greater Value from Your Existing Splunk Data

Realizing the full potential of your Splunk investment requires more than just understanding current usage; it ...

Continue Your Journey: Join Session 2 of the Data Management and Federation Bootcamp ...

As data volumes continue to grow and environments become more distributed, managing and optimizing data ...