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: 
prat1507
Specialist
Specialist

Max date in comma separated date column

Hi all

I've a column with comma separated date values. Approx 8000 records. I need to store the max date and min date in separate fields.

Kindly help.


Regards
Pratyush

1 Solution

Accepted Solutions
sunny_talwar

Something along these lines

Table:

LOAD Max(Dates) as MaxDate,

Min(Dates) as MinDate;

LOAD SubField(Dates, ',') as Dates;

LOAD * INLINE [

    Dates

    200,300,400,500

] (delimiter IS '|');

View solution in original post

6 Replies
Anil_Babu_Samineni

First you need to Bifurcate using SubField() ..

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
sunny_talwar

Something along these lines

Table:

LOAD Max(Dates) as MaxDate,

Min(Dates) as MinDate;

LOAD SubField(Dates, ',') as Dates;

LOAD * INLINE [

    Dates

    200,300,400,500

] (delimiter IS '|');

prat1507
Specialist
Specialist
Author

But how do I link this to my existing table?? Can I use resident load?

sunny_talwar

You sure can

prat1507
Specialist
Specialist
Author

Hi My data is as below:

  

InvoiceInvoice Start DateInvoice End Date
12017/06/01, 2017/06/01, 2017/06/012017/06/30, 2017/06/30, 2017/06/30
22017/07/01, 2017/07/01, 2017/07/012017/07/31, 2017/07/31, 2017/07/31
32017/08/01, 2017/08/01, 2017/08/012017/08/31, 2017/08/31, 2017/08/31
42017/10/01, 2017/10/01, 2017/10/012017/10/31, 2017/10/31, 2017/10/31
52017/06/012017/06/30
62017/06/012017/06/30
72017/07/012017/07/31
82017/08/012017/08/31
92017/09/012017/09/30
102017/10/012017/10/31
112017/05/012017/05/31
122017/06/012017/06/30
132017/07/012017/07/31
142017/04/172017/04/30
152017/04/01, 2017/04/01, 2017/05/012017/04/30, 2017/04/30, 2017/05/31

I need min of Invoice Start Date and max of Invoice End date, along side Invoice in a separate table from this data. Could you plz help me with this.

prat1507
Specialist
Specialist
Author

Done on my own. Thanks a lot Sunny for the guidance.