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
Get Updates on the Splunk Community!

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!

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

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...