Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
Hi,
Try this..
=num(WeekDay(today()))
Great thanks !
That does the trick; is the documentation wrong, or am I just misunderstanding ?
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
Stefan
That's a really helpful explanation and gives a good understanding to what's going on here.
Regards