TalendDate.diffDate ==> no days between March 27th and March 28th ?
Hi,
I have a little problem, when I use the TalendDate.diffDate function, in order to count the number of days between January, 1st 2011 and today.
The TalendDate.diffDate function seems to forget a day in March...
I may be crazy, but when I use the following instruction in a tMap, I have the same answer for March 27th and March 28th :
My colleagues foud the bug : it's about the time shift for summer...
It happended during the night of the 27th to the 28th...
The function can be used, but I need to specify the hours in the date... One hour less minimum in the second date...
For example :
TalendDate.diffDate(TalendDate.parseDate("yyyy-MM-dd-HH","2011-03-28-16"),TalendDate.parseDate("yyyy-MM-dd-HH","2011-01-01-15"),"dd")
==> 86 ==> CORRECT !
You can see the problem using the function with the differences in hours :
TalendDate.diffDate(TalendDate.parseDate("yyyy-MM-dd","2011-03-28"),TalendDate.parseDate("yyyy-MM-dd","2011-01-01"),"HH")
==> 2063 (we miss an hour to reach 2064 hours i.e. 86 days expected)
Many thanks to Nicolas and Jean-Noël...
Anyone for the Talend team ? This bug is understandable, but may be serious : I use this function to calculate Julian Dates that would be wrong from this week...
Hello,
I would like to know how I do in Talend to calculate the age of a person from his birth date and the current date?
I used this code:
TalendDate.diffDate(TalendDate.parseDate("dd-MM-yyyyy","11-08-2013"),TalendDate.parseDate("dd-MM-yyyyy","20-01-2000"),"dd")
I'd like it to be dynamic I do not know if we can do that.??
TalendDate.diffDate(TalendDate.parseDate("dd-MM-yyyyy","TalendDate.getCurrentDate()"),TalendDate.parseDate("dd-MM-yyyyy","row6.dateNaiss"),"dd")
But it shows me an error: Type mismatch: can not convert long to float
Thank you in advance