Getting Data In

Extract timestamp when there is only a year and month

SquarePeg
Engager

Hi

I've got a csv file where the first line contains the field names and the rest are separate events but the first column is year and the second is month. There are no other time-based fields i.e. day, hour, etc so I am having difficulty in creating a _time field.

Does anyone know how I can generate a _time field using only year and month? The day, hour, etc are irrelevant.

Thanks in advance

 

Labels (3)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

Have you tried something like this in props.conf?

[mysourcetype]
TIMESTAMP_FIELDS = year,month
TIME_FORMAT = %Y,%m
---
If this reply helps you, Karma would be appreciated.

SquarePeg
Engager

Hi

Yes, it doesn't recognise it because it isn't a full date format

0 Karma
Get Updates on the Splunk Community!

Now Available: Cisco Talos Threat Intelligence Integrations for Splunk Security Cloud ...

At .conf24, we shared that we were in the process of integrating Cisco Talos threat intelligence into Splunk ...

Preparing your Splunk Environment for OpenSSL3

The Splunk platform will transition to OpenSSL version 3 in a future release. Actions are required to prepare ...

Easily Improve Agent Saturation with the Splunk Add-on for OpenTelemetry Collector

Agent Saturation What and Whys In application performance monitoring, saturation is defined as the total load ...