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

Announcements
Streamlining user types in Qlik Cloud capacity-based subscriptions: Read the Details
cancel
Showing results for 
Search instead for 
Did you mean: 
rllysm0ll
Contributor
Contributor

Convert date ranges into dates

 

Name Start Date End Date
A 01-01-23 05-01-23
B 02-05-23 06-06-23
C 03-04-23 07-04-23
D 04-04-23 06-04-23

 

Are we able to convert date range into the dates respectively?

For example, for Name A, the range should consist: 01-01-23, 02-01-23, 03-01-23, 04-01-23, 05-01-23 (would want to see this)

 

Thanks in advance!

Labels (2)
1 Reply
PrashantSangle

Hi,

Yes it is possible. Try below code

 

Test:
Load Name,Date(Date#(Start_Date,'DD-MM-YY')) as Start_Date,Date(Date#(End_Date,'DD-MM-YY')) as End_Date inline [
Name, Start_Date, End_Date
A, 01-01-23, 05-01-23
B, 02-05-23, 06-06-23
C, 03-04-23, 07-04-23
D, 04-04-23, 06-04-23
];


NoConcatenate
Final:
Load *, Date(Start_Date+IterNo()-1) as missing_date

Resident Test
While Date(Start_Date+IterNo()-1)<=End_Date;

Drop table Test;

Exit Script;

 

Regards,

Prashant Sangle

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂