Page 1 of 1

strange datediff behaviour

Posted: Mon 12 Apr 2021 20:19
by albourgz
using oracle 12.2, unidac 8.3.2, c++ builder 10.3.2, VCL win32.

select {fn DATEDIFF(DAY,SYSDATE+5, SYSDATE+6)} from dual
=>Expected 1, but answer is 11: floor (sysdate+6-sysdate+5).
select {fn DATEDIFF(DAY,(SYSDATE+5),(SYSDATE+6))} from dual
returns the right value.

I think unidac should add parentheses automatically.

Re: strange datediff behaviour

Posted: Thu 15 Apr 2021 20:21
by MaximG
We've reproduced the issue and fixed it. The fix will be included in the next build of our product. As a workaround, we can send you a night UniDAC build including the required changes. For this provide us with your license number and IDE version you are interested in . For your convenience, please use the e-support form https://www.devart.com/company/contactform.html

Re: strange datediff behaviour

Posted: Tue 20 Apr 2021 14:19
by albourgz
Thanks.

Do you have an idea of next release date?

Re: strange datediff behaviour

Posted: Fri 18 Jun 2021 13:27
by MaximG
We don't have the exact date yet, but we send you the nightly build

Re: strange datediff behaviour

Posted: Fri 16 Jul 2021 09:37
by MaximG
The new version of UniDAC that contains the fix is already available for download on our website.