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!

Cultivate Your Career Growth with Fresh Splunk Training

Growth doesn’t just happen—it’s nurtured. Like tending a garden, developing your Splunk skills takes the right ...

Introducing a Smarter Way to Discover Apps on Splunkbase

We’re excited to announce the launch of a foundational enhancement to Splunkbase: App Tiering.  Because we’ve ...

How to Send Splunk Observability Alerts to Webex teams in Minutes

As a Developer Evangelist at Splunk, my team and I are constantly tinkering with technology to explore its ...