Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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 !
@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:"?
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
@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:
Java 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
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
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.
Hi ,
That is exactly what I've been searching for, and it works so well. Thank you so much!