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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
belhabir
Contributor
Contributor

How to insert data from multiple date inputs into a single column of date type

Hi All,

I have these columns with the following data:

row1.date_creation_interview: 2022-12-01

2023-01-23

row1.date_interview :2020-04-22

2021-05-12

row2.date_creation_offre:2023-12-04

2010-06-12

I want to have them all in the same column in a new table: Date_column

2022-12-01

2023-01-23

2020-04-22

2021-05-12

2023-12-04

2010-06-12

Can you please help me.

thank you !

Labels (2)
6 Replies
Anonymous
Not applicable

@abir belh​ , are these two rows of data?

​row1.date_creation_interview: 2022-12-01

2023-01-23

 

the first row contains text "​row1.date_creation_interview:"?

belhabir
Contributor
Contributor
Author

hi,

yes these are two rows of data of date type, same for row1.date_interview and row2.date_creation_offre

actually they all contain date even the output

 

best regards

Anonymous
Not applicable

@abir belh​ , thanks for your explanation. Read the row as a string, and then extract the date part from the string if the row contains ":", eg:

0695b00000lxpdeAAA.pngJava code on tJavaRow:

if(input_row.data.contains(":")){

output_row.data=(input_row.data.substring(input_row.data.indexOf(":")+1)).trim();

}else{

output_row.data=input_row.data;

}

 

tConvertType: convert the data type from string to Date.

 

 

Regards

Shong

 

 

belhabir
Contributor
Contributor
Author

Hi,

thank you for the solution.

Just one more question: I'm getting data from multiple inputs, and more clearly, the rows that I mentioned belong to different tables from a database. I tried using tmap to put those rows in one table, but it's not working very well since there is no way that I can join them. Could you please help me find a solution for this?

thank you

 

 

Best Regards

anselmopeixoto
Partner - Creator III
Partner - Creator III

Hi @abir belh​ 

 

If I got you right, you could do it with an SQL UNION between those tables or using tUnite component, if those tables come from different databases.

belhabir
Contributor
Contributor
Author

Hi ,

That is exactly what I've been searching for, and it works so well. Thank you so much!