Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
When using the weekday function I get the wrong result.
For example: for 31-12-2013 the result is Sunday instead of Tuesday.
In the script the following lines are included
SET DateFormat='DD-MM-YYYY';
SET TimestampFormat='DD-MM-YYYY h:mm:ss[.fff]';
SET DayNames='sa;su;mo;tu;we;th;fr';
Some of the formulaes I tried are (where datum is the date field):
All giving the same wrong result.
What am I doing wrong?
Hi,
I think you have to set DayNames as
SET DayNames='mo;tu;we;th;fr;sa;su';
Since you are already telling it how to interpret the dates with the SET statement, perhaps just try using the date() format function vs the date#() which is an interpreter. Otherwise I'd say try nesting the date#() function inside of the date() function.
From a technical brief posted on the community...
"It is often practical to nest an interpretation function inside a formatting function, e.g.
Date( Date#( DateField, 'M/D/YY'), 'YYYY-MM-DD') as Date
The inner function ensures that the input text is interpreted correctly – so that a serial
number representing the date is created. The outer function ensures that the serial number
is displayed in a correct date format."
http://community.qlik.com/servlet/JiveServlet/previewBody/3102-102-4-4191/DateFields-TechBrief-US_v2...
Hi,
I think you have to set DayNames as
SET DayNames='mo;tu;we;th;fr;sa;su';
Thanks, so easy can it be.
The order of the days are bad.
Try:
SET DayNames='mo;tu;we;th;fr;sa;su';