Splunk Search

How to assign current week # to events?

atebysandwich
Path Finder

I have a list of events that happened over the last couple of weeks but the will be appended as it will be ran each week. I would like to create a search to show the number week of the year corresponding with the event. 

I was was thinking something like this, but it applies to all events regardless of the time stamp. 

 

| eval Current_Week=tonumber(strftime(now(),"%V"))

 

I understand I need to add more to the eval command to compare time of the event. 

Labels (1)
0 Karma

yuanliu
SplunkTrust
SplunkTrust

Do you mean this?  Not clear what was the desired result.

| eval Then_Week=tonumber(strftime(_time,"%V"))

 

0 Karma
Get Updates on the Splunk Community!

What’s New in Splunk Cloud Platform 9.1.2308?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2308! Analysts can ...

Index This | Why do they call it hyper text?

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

State of Splunk Careers 2023: Career Resilience and the Continued Value of Splunk

For the past three years, Splunk has partnered with Enterprise Strategy Group to conduct a survey that gauges ...