cancel
Showing results for 
Search instead for 
Did you mean: 
Workflow Hero

Get start and end of week in Workflow

Hi Everyone

is there to get the start and end of the week if given current date?

for example, if I use Feb 02, 2018, I want to get the start of the week to be January 29, 2018 (Monday) and the end of the week to be Feb 4, 2018 (Sunday).

and may be as an extension of that, how would I go about getting the start and end of the previous week?

for example, if I use Feb 02, 2018, I want to get the start of the week to be January 22, 2018 (Monday) and the end of the week to be January 28, 2018 (Sunday).

what I'm trying to do is create a workflow to generate a report for the previous week.  Right now I'm using Current date - 1 and current day - 7, but if I run the job for anything other then the Monday, it would return the incorrect date.  I would like to allow the job to run on any day and still pick up the current or Previous week. 

Thanks

Labels: (2)
0 Kudos
Reply
1 Reply
Workflow Hero

Re: Get start and end of week in Workflow

can you check what day of the week today is using format date to get the day name and then use a switch to add the appropriate number of days.

i.e. if today is Saturday then start of week is today - 5 and end of week is today + 1

have a look at some of these for an idea;

https://community.nintex.com/community/build-your-own/nintex_gallery/blog/2017/02/14/february-2017-m...

https://community.nintex.com/docs/DOC-6301-february-mission-the-patch-schedule

0 Kudos
Accept as Solution Reply