Dashboards & Visualizations

How do I display the current date and time on my dashboard?

Explorer

I want to display current date and time on my dashboard. I'm currently using:

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

to get month and year.
I want date, month, year and time.
Thanks

Tags (3)
0 Karma
1 Solution

Legend

Try this

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

http://docs.splunk.com/Documentation/Splunk/6.4.2/SearchReference/Commontimeformatvariables

View solution in original post

SplunkTrust
SplunkTrust

Use following

| gentimes start=-1 | eval current_time=strftime(now(),"%B %d, %Y %H:%M") | table current_time

OR

| gentimes start=-1 | eval current_time=strftime(now(),"%+") | table current_time

Explorer

Thanks @ somesoni2

0 Karma

Legend

Try this

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

http://docs.splunk.com/Documentation/Splunk/6.4.2/SearchReference/Commontimeformatvariables

View solution in original post

Explorer

Thanks @sundareshr

0 Karma