Welcome to Splunk Answers, a Q&A forum for users to find answers to questions about deploying, managing, and using Splunk products. Contributors of all backgrounds and levels of expertise come here to find solutions to their issues, and to help other users in the Splunk community with their own questions.

This quick tutorial will help you get started with key features to help you find the answers you need. You will receive 10 karma points upon successful completion!

Refine your search:

How to convert a string value in the format HH:mm:ss to usable seconds for a graph?

0

Hey Gang,

We are currently running Splunk Enterprise 6.3.1 on RHEL 6.x servers. I have a string value that I have brought in from a long that represents hours, minutes, and seconds in the form HH:mm:ss, and the user would like to graph the trend of the duration. The easiest way that I can think of to do this would be to convert this string into a number of seconds so that I could represent a single numeric value to graph. Does anyone have an easy way to do this, or an alternate way to graph HH:mm:ss? Thanks, in advance for any help you may be able to provide.

Okay, now for a follow up. Is there a way to graph the duration in it's HH:mm:ss format? The end user doesn't like the idea of showing her management the duration in total seconds as she feels management will be confused. I know this is a long shot, but if it was 01:15:30 (i.e. one hour, fifteen minutes and 30 seconds), she would like the graph to be numbered somehow as 1:15:30 and not 4530 seconds.