Dashboards & Visualizations

How do I display the current date (month and year) in the title of a dashboard?

chris_thuys
Path Finder

How can I display the current month and year ie "January 2015" in the title of a dashboard, ( not the search date)

Tags (4)
0 Karma

risgupta
Path Finder

/code
| makeresults
| eval prevWeekDate=strftime((now(),"-7d"),"%Y/%m/%d")
| table prevWeekDate
1

$result.prevWeekDate$

0 Karma

lguinn2
Legend

Ah, this requires a trick or two. You can't really put the date in a heading, but you could create a single value panel at the top of the dashboard, and this single value panel could contain the following search:

index=main | head 1 | eval month_year=strftime(now(),"%B %Y") | table month_year

Actually, I'll bet that you can put the data in a heading, if you write some javascript etc. I think the above method is pretty simple.

0 Karma

chris_thuys
Path Finder

Thanks for that. I'll try it out.

0 Karma
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

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