Splunk Dev

How to create a display with two dates, one being today's date and the other being the previous working day?

jwilliams1
Engager

Hi there,

I'm currently building a dashboard and need to display two dates, one being today's date and the other being the previous working day.

I use the query below for today's date

 <query> index=main | head 1 | eval Date = strftime(_time,"%d/%m/%Y") | fields Date</query>


Could you help me with the query to display the previous working day.

Many thanks!

Janine

0 Karma

isoutamo
SplunkTrust
SplunkTrust

Hi

could you describe your real issue why you try to get those two days? That way we could propose the whole solution to you.

r. Ismo

0 Karma

PaulPanther
Motivator

Do you wanna use these both dates as a timepicker input or do you just wanna display both dates in one or two panels?

One way could be:

| makeresults count=1
| eval _time=(_time - 86400)
0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...