Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
stephenedberkg
Creator II
Creator II

Add week

I have the week format like this

12-50-2016

i want to add this week to 2.

6 Replies
tresesco
MVP
MVP

12 is month? 50 is week? How do you derive/interpret this week format?

jonathandienst
Partner - Champion III
Partner - Champion III

I suggest that you give some more examples and explain what you expect the week to be.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
stephenedberkg
Creator II
Creator II
Author

my date format is

MM-W-YYYY

11-46-2016

11-47-2016

each id have different lock period i want to add the lock period into week

if my lock perios is 1

i want like this

11-47-2016

11-48-2016


i am using mapping function

InvoiceDate  + ( ApplyMap('LockPeriods',ID,'Not matching'))   as INV_Lock,

11-47-2016     + 1


tresesco
MVP
MVP

Try something like like:


MakeWeekDate(SubField(InvoiceDate, '-',3), SubField(InvoiceDate, '-',2)   +  ApplyMap('LockPeriods',ID) ) as INV_Lock_Date,

Not applicable

Hi Stephen,

Can you please see the below script. You will get the desired value.

input:

load * inline [

date

11-46-2016

11-47-2016

];

oo:

load SubField(date,'-',1)&'-'&RangeSum(SubField(date,'-',2),1) & '-'&SubField(date,'-',3) as ss 

Resident input;

Thanks,
Sreeman.

stephenedberkg
Creator II
Creator II
Author

I tried but i cant get any values