Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
chriys1337
Creator III
Creator III

Leading Zero for Calendarweeks

Hi all,

I am generating a Year & Calendarweek Field with the help of my date field

From week 1-9 the leading Zero is missing, which I need and I am adding it artificially with following expression:

weekYear(Date) & if(len(Week(Date))=1,0 & Week(Date),Week(Date) )) as Year_Week

Now I wonder, if there is a better way to force QlikView to put a leading Zero to the Week String?

Thanks for your help!

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Try like:

Num(Week(Date),'00') as TwoDigitWeek

View solution in original post

2 Replies
tresesco
MVP
MVP

Try like:

Num(Week(Date),'00') as TwoDigitWeek

chriys1337
Creator III
Creator III
Author

Thank you, I tried it with num(Week(date),'##') but this did not work....