Getting Data In

How to index .csv files with a custom time format from one of the columns?

fisuser1
Contributor

Hi! I'm looking for a way to index these events in a .csv file where the timestamp is very unusual and is one of the columns in the file?

LPROGR LDATE LTIME LMSGID LMSGFL LMSGLB LMSGTP LMSGTX LJOBNA LJOBUS LJOBNO
W1MAINC 20190530 3234 LOG0001 GMI_MSGF *LIBL *BEGIN W1MAINC started. The night-time date is 20190530. W1MAINC ESTOPER 837508

The format of LTIME is as below with some examples:

32 - 00:32 AM
3234 - 00:32:34 AM
10550 - 01:05:50 AM

0 Karma

fernanlee
Path Finder

Hi!

Remeber a timestamp need two elements "date" and "time", so the first step is concatenate the LDATE and LTIME columns.

The next step is apply some of the following functions described in the following link:

https://docs.splunk.com/Documentation/Splunk/8.0.0/SearchReference/DateandTimeFunctions

Probably the mask that you are looking for is similar to "%Y%m%d%H%M%S".

0 Karma
Get Updates on the Splunk Community!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...