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

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
Dayna
Creator II
Creator II

MakeWeekDate with ISO8601 Standard - December Dates

Hi All,

I have some values in a report, but sadly, I don't have a date so I have to create it using the function MakeWeekDate. This has been fine, and what I do is pass through the week number, year, and day of week:

makeweekdate(Year, Week, DayOfWeek)

This normally gives me the value I desire... All good... However, turning the year and how the calendar falls, week 52 is technically 2017 rather than 2016, so the above calculate would give a date of 31/12/2017, rather than 31/12/2016.

The test values to replicate is:

Year: 2017

Week Number: 52

Day of Week: 6

I did find an article about redefining week numbers, but as I don't have a date, I'm not sure if this is valid but does explain the ISO8601 date standards well (Redefining the Week Numbers).

Can someone help, please?

Many thanks,

Dayna

3 Replies
jayanttibhe
Creator III
Creator III

Hi,

In this case your week is broken between 2 diff years. I think you need to consider  "Weekyear "  instead of "Year" in order to make date by using function : makeweekdate

Attached is the sample example.  Maybe you are looking for this.

Jayant

Dayna
Creator II
Creator II
Author

Hi Jayant,

Sadly as I'm trying to make the date, I don't have the date to be able to apply the YearWeek value to. My data is only:

Year = 2017

Week = 52

DayOfWeek = 6

From there, I have to use MakeWeekDate, which needs at least the correct year and week.

Kind Regards,

Dayna

jayanttibhe
Creator III
Creator III

well I am not very sure maybe stalwar1‌  can help.