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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[resolved] How to compare dates in Talend

Hi,
I have two Oracle tables. TableA is the source table and TableB is the datamart table. Both tables have the same structure. What I want to do is to update datamart's TableB with data from TableA.
I have loaded the data from both tables in a HashOutput component and I have made TableB a lookup for Table A.
To update my datamart, I just wanted to look for data where tableA.row_changed_date is greater than tableB.row_changed_date.
I've tried using TalendDate.CompareDate but it seems like it's not working since it's not giving the expected result. Attach is my tmap mapping.. Can someone please check if I'm doing anything wrong? What is the best way to do date comparison in Talend?
I am using TOS5.2.
Thanks,
Josephine
Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hi, Josephine,
Try this TalendDate.diffDate(tableA.row_changed_date, tableB.row_changed_date,"dd") > 0

View solution in original post

2 Replies
Anonymous
Not applicable
Author

Hi, Josephine,
Try this TalendDate.diffDate(tableA.row_changed_date, tableB.row_changed_date,"dd") > 0
Anonymous
Not applicable
Author

Thanks Lino! It worked.. 0683p000009MACn.png