Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
datamind
Partner - Contributor II
Partner - Contributor II

change first day of week in a calendar object

Hi,

I have a calendar object in my module which shows monday as first day of week.

What can i do to change first day of week in the calendar to Sunday?

Thanks,

Raz/

14 Replies
Not applicable

Hi,

the value depends of the DateFormat set in the script, but also take a look into definition of WeekStart function.

regards

raz-datamind
Partner - Contributor
Partner - Contributor

Hi,

Date Format is DD/MM/YYYY.

i know the QV assumes first day of week to be monday, and if i want to have a FirstDayOfWeek field i use WeekStart(Date,0,-1),

But what i want to do now is to use Date field in a calendar object and have it start on sunday.

So i still have no idea how to achieve it.

Anonymous
Not applicable

Hi,

Please fiend the attachment of application and let me know,

  change the sorting based on numeric value asa asceinding.

Regards

Gabriel
Partner - Specialist III
Partner - Specialist III

Hi,

What i would do is to go to script editor (ctrl+E)

Change the default setting from 

SET DayNames='Mon;Tue;Wed;Thu;Fri;Sat,Sun';

to

SET DayNames='Sun;Mon;Tue;Wed;Thu;Fri;Sat';

Let me know if it worked

Regards,

Gabriel

raz-datamind
Partner - Contributor
Partner - Contributor

Hi Shaik,

i'm not sure what you had in mind, but i don't see how it is related to my question.

But thanks for trying to help.

raz-datamind
Partner - Contributor
Partner - Contributor

Hi Gabriel,

Already tried it, bur it seems that this setting is anly naming convention, and does not affect real week-day settings.

But thank you too for trying to help.

Gabriel
Partner - Specialist III
Partner - Specialist III

Hi,

In that case try this approach.

Right click the chart and

chart > Properties > Sort > check the box beside Expression & click on Expression > click on ecclipse (...) then type 

=Match(DIMENSION NAME,'Monday','Tuesday','Wednesday','Friday','Saturday','Sunday')

Click ok & ok

Let me know if it work

Regards,

Gabriel

raz-datamind
Partner - Contributor
Partner - Contributor

Hi Gabriel,

That's a nice approach and it would surely work in a table. but my object is a calendar object, and i see no change in sorting.

Thanks.

Gabriel
Partner - Specialist III
Partner - Specialist III

Hi,

Try this in the script editor

load dual ( string,numrep ) as DayOfWeek inline

[ string,numrep

Sunday,0

Monday,1

Tuesday,2

Wednesday,3

Thursday,4

Friday,5

Saturday,6

];