Skip to main content
Announcements
Save $600 on Qlik Connect registration! Sign up by Dec. 6 to get an extra $100 off with code CYBERSAVE: REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to know the name of a day of the week

Given a list box containing dates as shown in the figure, would like to have for each date, name of the day of the week.

data.JPG.jpg

ES. 12/feb/2014 -----------> Wednesday 12/feb/2014


From the user's guide I read that you have to use WWW in the script. Where to use the WWW? What should I do?

Thanks to all
Carlo

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

If you want to simply update your list box to show you can also add the Date as well as go to the expressions and add the below.

=WeekDay(DateField)

View solution in original post

7 Replies
Gysbert_Wassenaar

You can set a variable in the script for the long day names:

Set LongDayNames='Monday;Tuesday;Wednesday;Thursday;Friday;Saturday;Sunday';

You can then use the date() function to show the long day name: date(MyDateField, 'WWWW'). In chart objects you can often set the date format on the Number tab by selection Override Document Settings, selecting Date and set the date format to WWWW.


talk is cheap, supply exceeds demand
hic
Former Employee
Former Employee

In addition to Gysbert's answer:

You will automatically also have a

     Set DayNames = ...

defined in the script. These day names are used in the WeekDay() function and if you use WWW:

     WeekDay(MyDate) as WeekDay,

     Date(MyDate,'WWW YYYY-MM-DD') as WeekDay2,

HIC

jagannalla
Partner - Specialist III
Partner - Specialist III

Hi,

In load statement just use weekday statement.

Set LongDayNames='Monday;Tuesday;Wednesday;Thursday;Friday;Saturday;Sunday';

Load

*,

WeekDay(DATA)&' '& DATA AS WkDay

from table;

Not applicable
Author

Thank you all. I followed your advice and using the WeekDay I managed to get the desired result.

Many thanks
Carlo

MarcoWedel

please mark as answered

thanks

regards

Marco

Anonymous
Not applicable
Author

If you want to simply update your list box to show you can also add the Date as well as go to the expressions and add the below.

=WeekDay(DateField)

Not applicable
Author

Thanks Jebamalai I finally did what you say; I find it easier that way.

thank you very much


Carlo