Getting Data In

extracting timestamp without second

kyoungwoon
Engager

Hi everyone,
I'm trying to extract timestamp from following log entry.

0188010010999992012010100004+70933-008667FM-12+0009ENJA V0201001N006010021019N0030001N1+00171+00121096611ADDAA106002091AY161061AY221061GF108991081071002501999999MA1999999096501MD1710221+9999MW1611REMSYN088AAXX 01001 01001 11330 81006 10017 20012 39650 49661 57022 60021 76162 887// 333 91109;

Date information is 201201010000 in 16-27 position and it only contains YYYYMMDDHHMM, not SS. When I tried with "%Y%m%d%H%M", it always returned 2012010100004. (At the end, 4 is not the second information)
I tried with followings.

NO_BINARY_CHECK=1
SHOULD_LINEMERGE=false
TIME_FORMAT=%Y%m%d%H%M
TIME_PREFIX=^\d{15}

When I tried to grab only date information using "%Y%m%d", it always returned 201201010. One more '0' at the end which should not be included. It makes problem when the hour is 11 or 12 as the day became 11th.
Why one additional digit is grabbed?

Any suggestions?
Thank you in advance.

Tags (1)
0 Karma

BobM
Builder

Try adding

MAX_TIMESTAMP_LOOKAHEAD=12

That should force it to ignore the 13th digit.

kyoungwoon
Engager

I've tried, but it didn't work.

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!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...