Convert Seconds to Hours Minutes Seconds HHMMSS

Take any field in splunk that outputs a value in seconds and change it to report in HH:MM:SS format:

your.search.here | eval HHMMSS=tostring(Field_In_Seconds, "duration") | table HHMMSS
Share This:
Tagged:

Comments

  1. Juan Cortez

    2 Hours 0 Minutes 04 Seconds
    2 Hours 0 Minutes 08 Seconds
    2 Hours 0 Minutes 12 Seconds
    2 Hours 0 Minutes 16 Seconds
    2 Hours 0 Minutes 20 Seconds
    2 Hours 0 Minutes 24 Seconds
    2 Hours 0 Minutes 28 Seconds
    2 Hours 0 Minutes 32 Seconds
    2 Hours 0 Minutes 36 Seconds
    2 Hours 0 Minutes 40 Seconds
    2 Hours 0 Minutes 44 Seconds
    2 Hours 0 Minutes 48 Seconds
    2 Hours 0 Minutes 52 Seconds
    2 Hours 0 Minutes 56 Seconds
    2 Hours 0 Minutes 60 Seconds
    2 Hours 0 Minutes 64 Seconds
    2 Hours 0 Minutes 68 Seconds
    2 Hours 0 Minutes 72 Seconds
    2 Hours 0 Minutes 76 Seconds
    2 Hours 0 Minutes 80 Seconds
    2 Hours 0 Minutes 84 Seconds
    2 Hours 0 Minutes 88 Seconds
    2 Hours 0 Minutes 92 Seconds
    2 Hours 0 Minutes 96 Seconds
    2 Hours 1 Minutes 00 Seconds

Leave A Comment?