Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

List of dates into weekly brackets

h12
8 - Asteroid

Hi team

 

I am not sure if this can be done dynamically (that would be ideal) but I have a list of dates in a column and I would like them to automatically be bracketed into week periods (Monday to Sunday). Ideally, the week column is created automatically based on the date in the first column

 

2022-04-04

2022-04-04

2022-04-04

2022-04-05

2022-04-07

2022-04-11

2022-04-15

2022-04-26

2022-04-26

2022-04-30

2022-05-02

2022-05-03

 

Into:

2022-04-042022-04-04 - 2022-04-10
2022-04-042022-04-04 - 2022-04-10
2022-04-042022-04-04 - 2022-04-10
2022-04-052022-04-04 - 2022-04-10
2022-04-072022-04-04 - 2022-04-10
2022-04-132022-04-11 - 2022-04-17
2022-04-152022-04-11 - 2022-04-17
2022-04-262022-04-25 - 2022-05-01
2022-04-262022-04-25 - 2022-05-01
2022-04-302022-04-25 - 2022-05-01
2022-05-022022-05-02 - 2022-05-08
2022-05-032022-05-02 - 2022-05-08
6 REPLIES 6
binu_acs
21 - Polaris

@h12 

binuacs_0-1649062740375.png

 

PhilipMannering
16 - Nebula
16 - Nebula

Hi @h12 

 

This should start you off,

PhilipMannering_0-1649062833201.png

 

Qiu
21 - Polaris
21 - Polaris

@h12 
My results is somehow different with your desired output.
I use the formula below to calculate the weekend.

DateTimeAdd([Date],(7-tonumber(DateTimeFormat([Date],'%u'))),'Days')

0404-h12.PNG

Qiu
21 - Polaris
21 - Polaris

@PhilipMannering 
We are same on the calculating the weekend. 😁

h12
8 - Asteroid

Thank you @binu_acs , @PhilipMannering and @Qiu! The above was very helpful!

Qiu
21 - Polaris
21 - Polaris

@h12 
Thank you for the feedback and glad to be helpful.

Labels
Top Solution Authors