Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

petersvendsen
New Contributor II

How to convert a week number to a weeknumber

Hi,

I have a xls file that contain a weeknumber e.g. 32 but when I load the data it is presented as 1, 2, 3.... upto 8.

So I assume that I need to convert the week to a weeknumber, what I have done is:

 

Week(Week of expected work) as WeekExpectedTask,

If I dont use anything it will change the week to a data in 1900.....

So none of the solutions work, what is wrong with this and why?

Thanks in advance,

Peter

1 Solution

Accepted Solutions

Re: How to convert a week number to a weeknumber

Hi Peter, you can use MakeWeekDate(YearNumber,WeekNumber)

=MakeWeekDate(Year(Today()), 32)

This will return a Date with the start day of the week.

3 Replies
sasiparupudi1
Honored Contributor III

Re: How to convert a week number to a weeknumber

please post a sample application

Re: How to convert a week number to a weeknumber

Hi Peter, you can use MakeWeekDate(YearNumber,WeekNumber)

=MakeWeekDate(Year(Today()), 32)

This will return a Date with the start day of the week.

petersvendsen
New Contributor II

Re: How to convert a week number to a weeknumber

Thanks this solved my problem

Community Browser