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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

date dimension

need to generate a date dimension table. what is the function to generate the week based on the date and not the day? 

Eg. If 31st dec is a Wednesday, it should be week 52, and Jan 1st should be week 1.

 

Thank you!

Labels (2)
3 Replies
akumar2301
Specialist II
Specialist II

http://diethardsteiner.blogspot.com/2012/02/talend-open-studio-populating-date.html?m=1

Above an example of date dimension. Function used changed to latest version. E.g.

int weekOfYear = TalendDate.getPartOfDate("WEEK_OF_YEAR",date);

Anonymous
Not applicable
Author

it is giving us the date of the year. we want to extract week of the month.

 

like from 23rd to 29th of feb should be week 4 of feb

1st march to 7th march should be week 1 of march

 

how to resolve this?

Thanks a lot 

akumar2301
Specialist II
Specialist II

Try

TalendDate.getPartOfDate("WEEK_OF_MONTH", row1.date)