One Star

TalendDate.diffDate ==> no days between March 27th and March 28th ?


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 :

==> 84
==> 85
==> 85 ???

I use TOS 4.1.1.r50363
Thank you for your help.
One Star

Re: TalendDate.diffDate ==> no days between 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 :
==> 86 ==> CORRECT !

You can see the problem using the function with the differences in hours :
==> 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...
One Star

Re: TalendDate.diffDate ==> no days between March 27th and March 28th ?

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:
I'd like it to be dynamic I do not know if we can do that.??
But it shows me an error: Type mismatch: can not convert long to float
Thank you in advance
Seven Stars

Re: TalendDate.diffDate ==> no days between March 27th and March 28th ?

Don't post the same question more than once -