Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
victor_greffet
Partner - Contributor III
Partner - Contributor III

Last sunday

Hi community,

I'm trying to store the last sunday in a variable called vLastSunday using makedate function, the format has to be DD/MM/YYYY.

Do you have an idea ?

Thanks,

Victor

1 Solution

Accepted Solutions
prat1507
Specialist
Specialist

Maybe this

=Date(WeekStart(Today())-1,'DD/MM/YYYY')

Regards

Pratyush

View solution in original post

3 Replies
shraddha_g
Partner - Master III
Partner - Master III

Calculate a field with DayName() and use that field in set analysis.

Date(Max({<DayName = {'Sun'}>} DateField),'DD/MM/YYYY')

prat1507
Specialist
Specialist

Maybe this

=Date(WeekStart(Today())-1,'DD/MM/YYYY')

Regards

Pratyush

victor_greffet
Partner - Contributor III
Partner - Contributor III
Author

Thanks for your answer,

I tried your solution but i was not very adapted to my app.

I finally did :

makeweekdate(year(today(1)) , week(today(1))-1  , 6 )

and it works well