Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read 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
Partner - Champion III
Partner - Champion III

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
Partner - Specialist III
Partner - Specialist III

use

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

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

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