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!

Database Performance Sidebar Panel Now on APM Database Query Performance & Service ...

We’ve streamlined the troubleshooting experience for database-related service issues by adding a database ...

IM Landing Page Filter - Now Available

We’ve added the capability for you to filter across the summary details on the main Infrastructure Monitoring ...

Dynamic Links from Alerts to IM Navigators - New in Observability Cloud

Splunk continues to improve the troubleshooting experience in Observability Cloud with this latest enhancement ...