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
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Data Persistence in the OpenTelemetry Collector

This blog post is part of an ongoing series on OpenTelemetry. What happens if the OpenTelemetry collector ...

Introducing Splunk 10.0: Smarter, Faster, and More Powerful Than Ever

Now On Demand Whether you're managing complex deployments or looking to future-proof your data ...

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...