Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
tchovanec
Creator II
Creator II

Number each Day of Week

I am looking for a way to number each day of the week. For example 01/07/2013 would be labeled 1 since it is the first monday. Also 12/31/2012 would be the 5th friday of december. Any suggestions would be really helpful. Thank you.

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Hmm, maybe like this then:

floor((day(MyDate)-1)/7)+1


talk is cheap, supply exceeds demand

View solution in original post

3 Replies
Gysbert_Wassenaar

Try floor(day(MyDate)/7)+1


talk is cheap, supply exceeds demand
tchovanec
Creator II
Creator II
Author

This gives me the correct answer of 5 for 12/31/2012, but for 01/07/2013 I am getting 2 where I would like 1 because it is the ist Monday of the month.

Gysbert_Wassenaar

Hmm, maybe like this then:

floor((day(MyDate)-1)/7)+1


talk is cheap, supply exceeds demand