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!

Index This | What is broken 80% of the time by February?

December 2025 Edition   Hayyy Splunk Education Enthusiasts and the Eternally Curious!    We’re back with this ...

Unlock Faster Time-to-Value on Edge and Ingest Processor with New SPL2 Pipeline ...

Hello Splunk Community,   We're thrilled to share an exciting update that will help you manage your data more ...

Splunk MCP & Agentic AI: Machine Data Without Limits

Discover how the Splunk Model Context Protocol (MCP) Server can revolutionize the way your organization uses ...