Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
pinky1234
Contributor III
Contributor III

Combining two date fields in to one field from same table

Hi,

I have two date fields both are in  MM/DD format in one table and i have to merge those two date fields into one field and use the merged field for Slider.

For Example:

One date field have 01/01 to 12/29 and other date field have 01/02 to 12/29.There are some duplicates also.I have to combine these two date fields in to one field from same table.Please let me know if you have any questions.

Regards,

Pinky

1 Solution

Accepted Solutions
hic
Former Employee
Former Employee

In its simplest form, you just have a second table. But you can also add a Master Calendar for the Canonical date as a third table.

HIC

View solution in original post

14 Replies
Anil_Babu_Samineni

Is this not working?

Date1 & Date2 as DateField

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
pinky1234
Contributor III
Contributor III
Author

Thanks for the reply.If i do Date1 & Date2 dates are coming like this 01/0201/03 for each date.Please find the attached screenshot so that you will understand the problem.Please let me know if you have any questions.Screenshot.PNG

ben_pugh
Creator
Creator

Are you saying that every record has two date fields of "[from date] to [to date]" so for each record you have four dates in total and you want to combine them into a single field?

If so, a simple way would be to split each date field into 2 separate fields in the load, so you have 4 fields in total in QlikView - you could then perform calculations on these to get your final result.

Anil_Babu_Samineni

This case, You can load 2 times like

Load Date1 as DateField From T1;

Concatenate

Load Date2 as DateField From T2;

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
hic
Former Employee
Former Employee

You may need a Canonical Date

HIC

pinky1234
Contributor III
Contributor III
Author

Thank you for the reply!

Every date has only one date like 01/02 but when i do Date1 & Date2 as anil suggested the dates are coming like attached screenshot. For example if Date1 has 01/02 to 06/25 and Date 2 has 05/02 to 12/30.So i wanted to combine like 01/02 to 12/30.Hope this helps.Let me know if you have any questions

Regards,

Pinky

pinky1234
Contributor III
Contributor III
Author

Both the Date1 and Date2 fields are in same table.

pinky1234
Contributor III
Contributor III
Author

Hi Henric,

Thanks for the reply,

How can Canonical date helps this problem.I wanted to merge two date fields in to one field use that field in same axis.

Note:Two date fields are in same table.

Can you please clarify or send us any sample qvw.

Regards,

Pinky

Anil_Babu_Samineni

Why not this?

Load Date1 as DateField From T1;

Concatenate

Load Date2 as DateField From T1;

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