Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Pomna
Creator III
Creator III

Converting date intervals to weeks

Hello experts,

I need help converting date interval to weeks.  My data has two dates  'Available From Date' and 'Available To Date'  Applicants choose  their  'Available From Date' and 'Available To Date' and indicate if they are going to be available for 

1 week, two weeks or more

I month, two months or more,

1 year, two years or more.

I need all these date intervals to be converted to weeks in the load script. For example if an applicant says one month then his availability should be 4 weeks, 2 months his availability should be 8 weeks, one year 52 weeks, two years 104 weeks and applicants whose availability is in weeks should remain in weeks. 

Any suggestions on how to achieve this in the load script will be highly appreciated.

3 Replies
Taoufiq_Zarra

@Pomna  can you share a sample data and the expected output ?

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
MayilVahanan

Hi Pomna,

Try with intervalmatch concept. 

https://help.qlik.com/en-US/sense/May2021/Subsystems/Hub/Content/Sense_Hub/Scripting/ScriptPrefixes/...

 

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Pomna
Creator III
Creator III
Author

 

Below is how my data looks like. The part circled in red need to all be converted to weeks. That is, values for the column 'Applicant Commitment Interval' should all be in weeks. Need to do that in load script

Pomna_0-1628699039767.png