Getting Data In

How to use strptime for a time field in the format hhmm?

svercelli
Path Finder

In my new data set, the time comes in the format 1652 as it relates to 4:52pm. However, when it is before 1AM it comes in simply as 52 representing 12:52am. What would a strptime look like for this or is it even possible?

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Strptime will not accept "52" using "hhmm" as a format string.

I hope by "new data set" you mean this is recent development work. If so, go back the developer and ask for a proper time field.

---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Splunk Observability Cloud’s AI Assistant in Action Series: Analyzing and ...

This is the second post in our Splunk Observability Cloud’s AI Assistant in Action series, in which we look at ...

Elevate Your Organization with Splunk’s Next Platform Evolution

 Thursday, July 10, 2025  |  11AM PDT / 2PM EDT Whether you're managing complex deployments or looking to ...

Splunk Answers Content Calendar, June Edition

Get ready for this week’s post dedicated to Splunk Dashboards! We're celebrating the power of community by ...