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

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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.
Labels (2)
3 Replies
Anonymous
Not applicable
Author

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
Contributor
Contributor

@shong This doesn't work if we want the difference in minutes i.e. "mm" format.

Anonymous
Not applicable
Author

@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?

Regards
Shong