Getting Data In

How do I convert a time with no timezone to epoch?

gregbo
Communicator

I'm using convert to change a time field to epoch. The time field has a bunch of different formats. I've got them all working except for values that have no time zone (e.g. "20180530104453"). for those, the convert command just returns the date in that same format. I'm using a timeformat of %Y%m%d%H%M%S. Any idea why it's not working?

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Have you tried strptime instead of `convert'?

---
If this reply helps you, Karma would be appreciated.
0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Get Agentic with Splunk Lantern: Connect to Cisco Cloud Control, Transform ...

Splunk Lantern is Splunk’s customer success center that provides practical guidance from Splunk experts on key ...

July Community Events: Master ITSI 5.0 & Automate Splunk

Struggling with alert fatigue or feeling like you're spending more time on infrastructure maintenance than ...

New Release of Federated Search: Bringing Splunk Analytics to More of Your Data

Organizations today are generating more data than ever and storing it across cloud object stores, data lakes, ...