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!

Maximize the Value from Microsoft Defender with Splunk

 Watch NowJoin Splunk and Sens Consulting for this Security Edition Tech TalkWho should attend:  Security ...

This Week's Community Digest - Splunk Community Happenings [6.27.22]

Get the latest news and updates from the Splunk Community here! News From Splunk Answers ✍️ Splunk Answers is ...

Reminder! Splunk Love Promo: $25 Visa Gift Card for Your Honest SOAR Review With ...

We recently launched our first Splunk Love Special, and it's gone phenomenally well, so we're doing it again, ...