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!

See just what you’ve been missing | Observability tracks at Splunk University

Looking to sharpen your observability skills so you can better understand how to collect and analyze data from ...

Weezer at .conf25? Say it ain’t so!

Hello Splunkers, The countdown to .conf25 is on-and we've just turned up the volume! We're thrilled to ...

How SC4S Makes Suricata Logs Ingestion Simple

Network security monitoring has become increasingly critical for organizations of all sizes. Splunk has ...