Splunk Search

how to increment a value in eval function

edookati
Path Finder

I need to display the current hour and the current hour + 1 values in the chart and I am using the below eval function for the same...

eval monthDateHour=date_month.".".date_mday." ".date_hour.":"."00"." - "."date_hour+1"

But it doesn't work. Can someone please help me?
Thanks.

Tags (1)
0 Karma
1 Solution

pradeepkumarg
Influencer

You need to remove the quotes around date_hour+1.

eval monthDateHour=date_month.".".date_mday." ".date_hour.":"."00"." - ".(date_hour+1)

View solution in original post

pradeepkumarg
Influencer

You need to remove the quotes around date_hour+1.

eval monthDateHour=date_month.".".date_mday." ".date_hour.":"."00"." - ".(date_hour+1)

edookati
Path Finder

thanks. It worked fine.

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...