Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to set Monday as the first day of week

I have a problem when I would like to get week of year by the following expression:

TalendDate.formatDate("w", date)

For example, If date = 2019-01-06 it will return 2 which I would like it to return 1.

Labels (2)
7 Replies
manodwhb
Champion II
Champion II

@fararen , you have write expression the below way.

 

TalendDate.formatDate("w", date))-1

Anonymous
Not applicable
Author

It's not working for the other day

manodwhb
Champion II
Champion II

@fararen ,what is other day? can you give example.

Anonymous
Not applicable
Author

For 2019-01-07 it will return 1 which should return 2

manodwhb
Champion II
Champion II

@fararen ,check the below one is working as expected.

 

Sting date type

TalendDate.getPartOfDate("DAY_OF_WEEK",TalendDate.parseDate("yyyy-MM-dd", "2019-01-06"))

Date data type

TalendDate.getPartOfDate("DAY_OF_WEEK",row3.date)

Anonymous
Not applicable
Author

I would like to get week of year not day of week

manodwhb
Champion II
Champion II