Splunk Search

Strptime statement not extracting date/time

svercelli
Path Finder

I've been trying to import the data into splunk and have been unable to get the time/date to work. Included is a screenshot. Any help is appreciatedalt text

0 Karma
1 Solution

svercelli
Path Finder

Found that %m/%e/%y %k:%M worked.

View solution in original post

0 Karma

svercelli
Path Finder

Found that %m/%e/%y %k:%M worked.

0 Karma

woodcock
Esteemed Legend

It should be this:

%m/%d/%Y %H:%M
0 Karma

lguinn2
Legend

%Y is a 4-digit year

%y is the 2-digit year

0 Karma

woodcock
Esteemed Legend

Missed it by that much!

0 Karma

michael_kushma
Path Finder

Can you type out your Timestamp format. It's VERY hard to read.

My guess is that there line break in that field you're trying to extract from.

I also don't see an AM or PM so you shouldn't be using %p at all.

Should be: %m/%d/%Y %k:%M

0 Karma

somesoni2
Revered Legend

Could you provide the other configuration that you're using here, is this a structured format file (PSV/CSV/TSV etc)?

svercelli
Path Finder

its a csv.

0 Karma

somesoni2
Revered Legend

Well, I did some testing with sample CSV data and looks like the time format is the issue. The TIME format should be exactly same as what's in the "Start Date" field. So try timestamp format as "%m/%d/%Y %H:%M"

0 Karma

richgalloway
SplunkTrust
SplunkTrust

The screen shot is not visible. Try pasting some sample data as well as the strptime() strings you've tried.

---
If this reply helps you, Karma would be appreciated.
0 Karma

svercelli
Path Finder

The time I'm trying to base it on is the Start Date.

0 Karma

richgalloway
SplunkTrust
SplunkTrust

I don't see a Start Date. There is no screen shot or sample data.

---
If this reply helps you, Karma would be appreciated.
0 Karma

svercelli
Path Finder

Here it is

0 Karma

sk314
Builder

Did you try Auto Extraction?

0 Karma

svercelli
Path Finder

yes. no luck.

0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...