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!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...