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!

Enterprise Security Content Update (ESCU) | New Releases

In the last month, the Splunk Threat Research Team (STRT) has had 2 releases of new security content via the ...

Announcing the 1st Round Champion’s Tribute Winners of the Great Resilience Quest

We are happy to announce the 20 lucky questers who are selected to be the first round of Champion's Tribute ...

We’ve Got Education Validation!

Are you feeling it? All the career-boosting benefits of up-skilling with Splunk? It’s not just a feeling, it's ...