Getting Data In

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

Communicator

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

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