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: 
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?

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
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 .