Splunk Search

## How can I start each week from tuesday?

New Member

Below is my code. It starts each week from sunday. How can start each week from tuesday? Do I need to change anything in +1w@w?

| eval weeknum=strftime(relative_time(strptime(Date,"%d-%b"),"+1w@w"),"%Y/%V")

Tags (2)
1 Solution
Legend

@nikita012 seems like this is a followup question to your previous question. https://answers.splunk.com/answers/738645/convert-week-number-to-the-1st-date-in-that-week.html

You can use the following snap-to setting to set to Tuesday `"-0w@w+2d"`. Also if your previous question is resolved kindly accept/upvote that as well.

``````| eval WeekStartDate=strftime(relative_time(strptime(MinTime,"%m/%d/%Y"),"-0w@w+2d"),"%m/%d/%Y")
``````
____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
Legend

@nikita012 seems like this is a followup question to your previous question. https://answers.splunk.com/answers/738645/convert-week-number-to-the-1st-date-in-that-week.html

You can use the following snap-to setting to set to Tuesday `"-0w@w+2d"`. Also if your previous question is resolved kindly accept/upvote that as well.

``````| eval WeekStartDate=strftime(relative_time(strptime(MinTime,"%m/%d/%Y"),"-0w@w+2d"),"%m/%d/%Y")
``````
____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
Get Updates on the Splunk Community!

#### Detecting Remote Code Executions With the Splunk Threat Research Team

WATCH NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If exploited, ...

#### Enter the Splunk Community Dashboard Challenge for Your Chance to Win!

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

#### .conf24 | Session Scheduler is Live!!

.conf24 is happening June 11 - 14 in Las Vegas, and we are thrilled to announce that the conference catalog ...