Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Karim_Khan
Creator III
Creator III

how to get saturday and sunday dates

Hi Team,

    I have run the script for getting weekend but i am not getting saturday

WeekEnd(DATE) AS WEEKEND

KK
1 Solution

Accepted Solutions
Anonymous
Not applicable

Hi Karim,

Try this: If(WeekDay(DATE) = 'Sat' or WeekDay(DATE) = 'Sun',DATE)

Regards!

View solution in original post

9 Replies
Anonymous
Not applicable

Hi Karim,

Try this: If(WeekDay(DATE) = 'Sat' or WeekDay(DATE) = 'Sun',DATE)

Regards!

Anil_Babu_Samineni

Do you mean you want to load only Saturday date?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
tresesco
MVP
MVP

Try like:  

Weekday(WeekEnd(DATE)) AS WEEKEND    

If your week starts on Monday, it will return Sunday as output. If you need the week to start on Sunday and get Saturday as weekend output try:

Weekday(Weekend(today(),0,-1))   

Karim_Khan
Creator III
Creator III
Author

tnx

KK
Karim_Khan
Creator III
Creator III
Author

I wanted both sat and sun

KK
Karim_Khan
Creator III
Creator III
Author

I wanted both sat and sun

KK
Anonymous
Not applicable

You're wellcome!

capriconuser
Creator
Creator

@Karim_Khan  your solution extract only Saturdays .. i want to get also Sundays so what should i do 

ajayvermaida
Partner - Creator
Partner - Creator

Hi Anil,

I want to find the time difference only for saterday and sunday between two dates from 10 AM to 4 PM .

how can I do that .

for example if my startdate - 31-01-2020  and enddate = 5-2-2020 

I just want to pick Saterday and sunday between these two date and the time in between 10 AM to 4 PM .