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 | Why did the turkey cross the road?

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

Enter the Agentic Era with Splunk AI Assistant for SPL 1.4

  🚀 Your data just got a serious AI upgrade — are you ready? Say hello to the Agentic Era with the ...

Feel the Splunk Love: Real Stories from Real Customers

Hello Splunk Community,    What’s the best part of hearing how our customers use Splunk? Easy: the positive ...