Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld online is next week! REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
tom2qlik
Creator
Creator

Creating a YearWeek from today

Hi All,

I am attempting to create a date in the format of 'YYYYWW' from today's date.

I had originally "Year(Date(Today()))&Week(Date(Today()))-35)" which produced 201852 meaning the week is correct but the year is not. My aim was for the date to show as 201752, but quickly realised the above code won't be accurate as I would need to hardcode values on the year and on the week.

Basically I'm looking for help to get the year and week for 5 weeks ago which will be 201752 today and in two weeks time be 201802.

Thanks,

Tom

1 Solution

Accepted Solutions
sunny_talwar

May be this

=Year(Today()-35)&Week(Today()-35)

View solution in original post

2 Replies
sunny_talwar

May be this

=Year(Today()-35)&Week(Today()-35)

tom2qlik
Creator
Creator
Author

Of course!  Thank you.