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!

Optimize Cloud Monitoring

  TECH TALKS Optimize Cloud Monitoring Tuesday, August 13, 2024  |  11:00AM–12:00PM PST   Register to ...

What's New in Splunk Cloud Platform 9.2.2403?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.2.2403! Analysts can ...

Stay Connected: Your Guide to July and August Tech Talks, Office Hours, and Webinars!

Dive into our sizzling summer lineup for July and August Community Office Hours and Tech Talks. Scroll down to ...