Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Show relevant date in regular days

Goal:

Display the date in the table if the date is NOT a weekend (satur- and sunday) and NOT holiday in weekdays in the expressen screen.

The date system should be based on Norway or Denmark

Problem:

How should I do it?

The table and its data is below and it is based on timestamp.

BeginEnd
2011-11-10 12:12:122011-11-12 12:12:12
2011-11-10 12:12:122011-11-11 08:12:12

// JJ

2 Replies
swuehl
MVP
MVP

Not sure if I fully understand your requirement or how you want to relate your Begin / End fields the date you want to display.

To check for weekend, you could use weekday() function:

weekday(date)

Week day. Returns an integer between 0-6.

Example:

weekday( '1971-10-30' ) returns 5.

If the date format used does not correspond to the one set in your operating system, QlikView will not be able to make a correct interpretation. See above under day(date).

I believe you need to load the holidays for your country from an external source, QV does not know any holidays by default. You can join a holiday table to your calendar and then do the check.

Not applicable
Author

"Not sure if I fully understand your requirement or how you want to relate your Begin / End fields the date you want to display."

in this context, no relation between begin and end.