Dashboards & Visualizations

Formatting _time on X-axis of a Chart

jbrenner
Path Finder

I have a chart in which each bar represents a day's worth of data.
Even though the values for _time are formatted like "2017-11-29" when I run the query, the values along the X-axis of the chart are displayed in the following format:

2017-11-29T00:00:00.000-05:00

Does anyone know how to get the values along the x-axis to display in the "2017-11-29" format?

Thanks,
Jonathan

0 Karma

cmerriman
Super Champion

Are you using chart or timechart? timechart span=1d.... should automatically format the time of the axis nicely. Otherwise, you’ll want to do a fieldformat or eval on your _time field to display it how you wish. Something like eval day=strftime(_time,"%Y-%m-%d") |chart count by day

jbrenner
Path Finder

I'm not using "chart" or "timechart".
I'm using "bucket _time span=1d"

Thanks,
Jonathan

0 Karma
Get Updates on the Splunk Community!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...