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.
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
@AmrapaliPatil I just made a simple testing and I can confirm the function TalendDate.diffDate can get the difference in minutes. About your issue, I guess your timestamp data does not contains the time part, can you show an example what the dbinput component read from db?
Can you have a try to change the data type to datetime and test again?