Getting Data In

How to convert the time from hh:mm:ss.6Q into hh:mm:ss ?

Real_captain
Path Finder

HI 

Can someone please let me know how to convert the time from the format hh:mm:ss.6Q  to hh:mm:ss ?? 

 

 

Labels (1)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

Use the strptime and strftime functions to convert time formats.

| eval timeField=strftime(strptime(timeField,"%H:%M:%S.%6Q"), "%H:%M:%S")

You also can use string manipulation to cut off the last 7 characters.

 

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

Index This | When is October more than just the tenth month?

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

Observe and Secure All Apps with Splunk

  Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...

What’s New & Next in Splunk SOAR

 Security teams today are dealing with more alerts, more tools, and more pressure than ever.  Join us for an ...