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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...