time difference

Six Stars

time difference

Hi,
I would like to find time dfference between dbinput and current timestamp. I want the difference in minuts.
My timestamp column in dbinput is date.
I am wondering how I can do it in talend.
Thanks.
Community Manager

Re: time difference

Hi
Using the built-in function, TalendDate.diffDate(Date date1, Date date2, String dateType), it return a long type, for exmaple:
TalendDate.diffDate(row1.mydate, TalendDate.getCurrentDate(),"mm")
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business