Getting Data In

Date Parsing

nickhills
Ultra Champion

Hello all,
We have just encountered a problem with date parsing as we have progressed into the new month.

Our log files output a date and time stamp in the following pattern:

02-07-2012 @ 12:15:23.211

This has been fine up until 1st July, wherein splunk is now parsing the above log line, as the 7th Feb, instead of 2nd of the 7th.

I have created a entry in my props.conf file for this sourcetype, and defined the following:

TIME_FORMAT = %d-%m-%Y @ %H:%M:%S.%3N

But this has not resolved the issue, is there something wrong with my Time format, and why would this only just have started (as of 1st July)

If my comment helps, please give it a thumbs up!
Tags (2)
0 Karma
1 Solution

Ayn
Legend

You have the percent sign on the wrong side. The percent signs should go before the format, so:

%d-%m-%Y @ %H:%M:%S.%3N

View solution in original post

0 Karma

Ayn
Legend

You have the percent sign on the wrong side. The percent signs should go before the format, so:

%d-%m-%Y @ %H:%M:%S.%3N
0 Karma

nickhills
Ultra Champion

In the end i solved this by changing the date format in my logs.

Whilst this did not solve my initial problem, Ayn correctly pointed out that my syntax was wrong.

If my comment helps, please give it a thumbs up!
0 Karma

nickhills
Ultra Champion

Ayn,

Sorry - thats my mistake when typing the question.
The config in use is as per your correction above, however the parsing is incorrect

If my comment helps, please give it a thumbs up!
0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

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

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...