Splunk Search

How to convert time string to timestamp in 24 hour format?

ashu1702
New Member

Hi 

Suppose the time zone is in string format like 100403, need to convert this in 24 hour format. Output should be like 22:04:03. 

Labels (1)
Tags (2)
0 Karma

VatsalJagani
SplunkTrust
SplunkTrust

@ashu1702 - How in this example would you identify whether it's AM or PM?

It seems like here you are assuming it's PM and that's why conversion says 22:04:03.

0 Karma

ashu1702
New Member

Hi @VatsalJagani 

Yes, Vatsal it's in PM.

What would be the solution in both case i.e if AM or PM.

 Can you help me with that?

 

 

0 Karma

VatsalJagani
SplunkTrust
SplunkTrust

@ashu1702  - But if you give a proper string that has a full value that includes AM/PM then I can give you the right eval statement that you can use.

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Calling All Security Pros: Ready to Race Through Boston?

Hey Splunkers, .conf25 is heading to Boston and we’re kicking things off with something bold, competitive, and ...

Beyond Detection: How Splunk and Cisco Integrated Security Platforms Transform ...

Financial services organizations face an impossible equation: maintain 99.9% uptime for mission-critical ...

Customer success is front and center at .conf25

Hi Splunkers, If you are not able to be at .conf25 in person, you can still learn about all the latest news ...