Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Skip the ticket, Chat with Qlik Support instead for instant assistance.
cancel
Showing results for 
Search instead for 
Did you mean: 
neha_sri
Creator III
Creator III

Calculate weekend date from week and year

Hi,

I have week and year with me and I want to find weekend date from that.

I have used this logic

floor(num(date((MakeDate(left(trim([Year Week]),4),1,1)-WEEKDAY(MakeDate(left(trim([Year Week]),4),1,3))+ WEEK *7) + 1) ))

but If I check  01-Jan-2012 but its weekend comes 31-Dec whereas it should come as 01-Jan .

How to correct it

Thanks in anticipation

2 Replies
jagan
Luminary Alumni
Luminary Alumni

Hi Neha,

Try using

LunarWeekend()

LunarWeekStart()

Ex:

LunarWeekStart(YearStart(Today()))

LunarWeekEnd(YearStart(Today()))

Regards,

Jagan.

MarcoWedel

MakeWeekDate(year, week, 6) = Sunday

MakeWeekDate(year, week, 5) = Saturday

hope this helps

regards

Marco