Dashboards & Visualizations

How to get time in x chart axis?

jip31
Motivator

hi

I use a timechart which is linked to a "today" token time 

On the x axis, I need only to display events between 7h and 19h

I tried this but the x axis go to 0.00h from the current time

How to do for the x axis begin only a 7h00?

thanks

 

index=toto
| eval local_time=strftime('_time', "%H%M") 
| search local_time >="0700" AND local_time <="1900" 
| timechart span=15min dc(s) as user by type

 

 

Labels (1)
Tags (2)
0 Karma
1 Solution

SanjayReddy
SplunkTrust
SplunkTrust

Hi @jip31 

time is coming as hour minuites because you are converting only %H %M in strftime 
if you want to add as date please add vatiables you needed 

FYI 

SanjayReddy_0-1646212486112.png

| eval local_time=strftime('_time', "%H%M")

View solution in original post

0 Karma

SanjayReddy
SplunkTrust
SplunkTrust

Hi @jip31 

assigne localtime as _time 

index=toto
| eval local_time=strftime('_time', "%H%M")
| eval _time=local_time
| search _time>="0700" AND _time<="1900"
| timechart span=15min dc(s) as user by type

0 Karma

jip31
Motivator

thanks but i have an issue on the x axis which is converted in hour minutes

how to avoid this?

0 Karma

SanjayReddy
SplunkTrust
SplunkTrust

Hi @jip31 

time is coming as hour minuites because you are converting only %H %M in strftime 
if you want to add as date please add vatiables you needed 

FYI 

SanjayReddy_0-1646212486112.png

| eval local_time=strftime('_time', "%H%M")

0 Karma

jip31
Motivator

I convert in hour minutes in order to choose only events in this slot time

so is it possible to do this while having good date format in x axis?

0 Karma
Get Updates on the Splunk Community!

Splunk Mobile: Your Brand-New Home Screen

Meet Your New Mobile Hub  Hello Splunk Community!  Staying connected to your data—no matter where you are—is ...

Introducing Value Insights (Beta): Understand the Business Impact your organization ...

Real progress on your strategic priorities starts with knowing the business outcomes your teams are delivering ...

Enterprise Security (ES) Essentials 8.3 is Now GA — Smarter Detections, Faster ...

As of today, Enterprise Security (ES) Essentials 8.3 is now generally available, helping SOC teams simplify ...