Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
Begin | End |
---|---|
2011-11-10 12:12:12 | 2011-11-12 12:12:12 |
2011-11-10 12:12:12 | 2011-11-11 08:12:12 |
// JJ
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:
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 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.