Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
richard_chilvers
Contributor III

Day Number

Hi

According to my documentation, in a script, the function WeekDay produces a number between 0-6. When I use it, I get a day name (eg. Mon). I suspect this may be to do with my settings.

Any ideas?

Thanks

1 Solution

Accepted Solutions
Not applicable

Re: Day Number

Hi,

Try this..

=num(WeekDay(today()))

4 Replies
Not applicable

Re: Day Number

Hi,

Try this..

=num(WeekDay(today()))

richard_chilvers
Contributor III

Re: Day Number

Great thanks !

That does the trick; is the documentation wrong, or am I just misunderstanding ?

Highlighted
MVP
MVP

Re: Day Number

Richard,

the documentation is wrong (at least weak / misleading), because weekday() is in fact returning a dual value with a text representation given the weekday name (as defined in the script or OS), and the weekday number (0 to 6).

This is similar to today() which returns a date as well in your standard date format (like 2013/02/13) and in a numerical representation: 41318.

Hope this helps,

Stefan

richard_chilvers
Contributor III

Re: Day Number

Stefan

That's a really helpful explanation and gives a good understanding to what's going on here.

Regards

Community Browser