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

Week Ending Syntax

I have a date field that needs to be converted to a week end date. The week ends on Tuesdays so the date should always convert to the following Tuesday unless the date is Tuesday itself then the value is fine.

How can this be setup in the load script? Thank you so much for the help!

1 Solution

Accepted Solutions
Gysbert_Wassenaar

You can use the WeekEnd function. The third parameter can be used to specify an offset in case the last day of the week is not Sunday. So WeekEnd(MyDate, 0, 2) should do the trick.


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
ramoncova06
Specialist III
Specialist III

use

date(floor(weekend(yourdate,0,2)))

Gysbert_Wassenaar

You can use the WeekEnd function. The third parameter can be used to specify an offset in case the last day of the week is not Sunday. So WeekEnd(MyDate, 0, 2) should do the trick.


talk is cheap, supply exceeds demand