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: 
Anonymous
Not applicable

Load only weekdays

Hi,

I have the following script

LOAD Date, Name, Value

WHERE Weekday(Date) = true ;

I only want the dates that occurs on weekdays.

Any assistance is appreciated.

Kind Regards

Dreamer78692

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hi,

Try:

LOAD

     Date, Name, Value

WHERE

     Weekday(Date)<>'sat.' AND Weekday(Date)<>'sun.'  ;

(check before that your DayNames is 'sat.' for saturday and 'sun.' for sunday)

View solution in original post

6 Replies
Gysbert_Wassenaar

Try this:

LOAD Date, Name, Value

WHERE Weekday(Date) <5 ;


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

Hi,

I tried that but for some reason Monday is also not getting loaded.

Kind Regards

Dreamer78692

MayilVahanan

Hi

LOAD Date, Name, Value

WHERE Wildmatch(Weekday(Date),'mon','tue','wed','thu','fri');

Hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Anonymous
Not applicable
Author

Hi,

Try:

LOAD

     Date, Name, Value

WHERE

     Weekday(Date)<>'sat.' AND Weekday(Date)<>'sun.'  ;

(check before that your DayNames is 'sat.' for saturday and 'sun.' for sunday)

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this

LOAD

     DateFieldName,

    *

FROM DataSource

WHERE WeekDay(DateFieldName) <> 'Sat' OR WeekDay(DateFieldName) = 'Sun';

Hope this helps you.

Regards,

Jagan.

vivientexier
Partner - Creator II
Partner - Creator II

A clean way to do this is to use NetWorkDaysDate() function.

LOAD

    Date

  , Name

  , Value

WHERE NetWorkDaysDate(Date, Date) = 1

;