Splunk Search

plot time against date in graph

usha_nittala
New Member

Hi everyone,

Is it possible to plot time which is in HH:MM format agains date which is in MM/DD/YYYY format .
the hours should come on y-axis and date on x-axis.

here is my sample data:

JOB NAME,ENDTIME,FORM,     DATE
FCIND60 ,23:45,EXCHANGES  ,22:58,03/27/2014
FMEGD70 ,23:45,EXCHANGES  ,23:39,03/27/2014
FSLCD70 ,23:45,EXCHANGES  ,22:49,03/28/2014
FRSCD80 ,23:45,EXCHANGES  ,22:45,03/27/2014
FKEND70 ,23:45,EXCHANGES  ,23:00,03/29/2014
Tags (3)
0 Karma

martin_mueller
SplunkTrust
SplunkTrust

Sure. Assuming your time field is TIME and your date field is DATE, you can do this:

base search | eval _time = strptime(DATE, "%m/%d/%Y") | eval seconds = TIME.":00" | convert dur2sec(seconds) | timechart span=1d avg(seconds)
0 Karma

martin_mueller
SplunkTrust
SplunkTrust

You can use timechart once you've set the _time field.

0 Karma

usha_nittala
New Member

Thanks so much Martin, but the problem I have is the file is not indexed and hence I cannot use timechart, I am using chart instead.

0 Karma
Get Updates on the Splunk Community!

Splunk Search APIを使えば調査過程が残せます

   このゲストブログは、JCOM株式会社の情報セキュリティ本部・専任部長である渡辺慎太郎氏によって執筆されました。 Note: This article is published in both Japanese ...

Integrating Splunk Search API and Quarto to Create Reproducible Investigation ...

 Splunk is More Than Just the Web Console For Digital Forensics and Incident Response (DFIR) practitioners, ...

Congratulations to the 2025-2026 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...