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!

Index This | When is October more than just the tenth month?

October 2025 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Observe and Secure All Apps with Splunk

  Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...

What’s New & Next in Splunk SOAR

 Security teams today are dealing with more alerts, more tools, and more pressure than ever.  Join us for an ...