Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

Extract date from a week?

Hello,

I'm currently working on data where the date is set as week 1 week 2 week 3 (week 1 begining January first). Id like to know if there is a way to transform this data into dates when I load my table?

This is what my loading script looks like atm:

     CrossTable(Weeks, Load, 4)

     LOAD [People]    as [Collab],

          [Center],

          [Projet],

          [Activity],

          Week1,

          Week2,

          Week3,

          Week4,

          Week5

          ......

Thanks in advance for any help concerning this matter!

Tags (3)
1 Solution

Accepted Solutions
Not applicable

Re: Extract date from a week?

Hi Loic,

i don't remember if such a function exists but what you can do is build a date from 01/01/13 (Date1)

using date + Nb

Where Nb is the number of days according to your week n° like

date = $(Date1) + ((WeekNo-1) * 7) + 1

regards

Chris

4 Replies
Not applicable

Re: Extract date from a week?

Hi Loic,

i don't remember if such a function exists but what you can do is build a date from 01/01/13 (Date1)

using date + Nb

Where Nb is the number of days according to your week n° like

date = $(Date1) + ((WeekNo-1) * 7) + 1

regards

Chris

Not applicable

Re: Extract date from a week?

Hi,

just take the week number 1,2,3...... from week1,week2,week3,..... and multiply with 7 and add with jan 1.

Not applicable

Re: Extract date from a week?

Oh I didnt realise I could manipulate Dates so easily since I'm begining with Click view. Thanks for this answer!

Not applicable

Re: Extract date from a week?

Same answer at almost the same time as christian, thanks both!

Community Browser