Alteryx Designer Desktop Discussions

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

How to find first date of country Week

kenan_turker
5 - Atom

Dear Community, 

 

I am looking for a solution to find first date of the country week for the related year. 

 

I have a put a simple table as below including year and week information. Could you please let me know how to produce the dates beside question marks?

 

Year WeekFirst date of the Week 
202222? (23.05.2022) 
202236? (29.08.2022)

 

Thanks 

3 REPLIES 3
ShankerV
17 - Castor

Hi @kenan_turker 

 

One way of doing this.

 

ShankerV_0-1678096638449.png

 

Many thanks

Shanker V

binuacs
20 - Arcturus

@kenan_turker Another method of finding the first date from the given week number

 

binuacs_0-1678097046264.png

 

Yoshiro_Fujimori
15 - Aurora

@kenan_turker ,

Another solution.

 

Using Formula tool only.

FirstDayOfYear = ToString([Year]) + "-01-01"

AddWeeks = DateTimeAdd([FirstDayOfYear],([Week]-1)*7,"days")

DayOfWeek = ToNumber(DateTimeFormat([AddWeeks],"%w"))

First date of the Week = DateTimeAdd([AddWeeks],-[DayOfWeek]+1,"days")

Check = DateTimeFormat([First date of the Week],"%a")

 

Output

Yoshiro_Fujimori_0-1678097616182.png

 

Labels