strange datediff behaviour

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
albourgz
Posts: 160
Joined: Wed 06 May 2009 12:17
Location: belgium

strange datediff behaviour

Post by albourgz » Mon 12 Apr 2021 20:19

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.

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: strange datediff behaviour

Post by MaximG » Thu 15 Apr 2021 20:21

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

albourgz
Posts: 160
Joined: Wed 06 May 2009 12:17
Location: belgium

Re: strange datediff behaviour

Post by albourgz » Tue 20 Apr 2021 14:19

Thanks.

Do you have an idea of next release date?

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: strange datediff behaviour

Post by MaximG » Fri 18 Jun 2021 13:27

We don't have the exact date yet, but we send you the nightly build

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: strange datediff behaviour

Post by MaximG » Fri 16 Jul 2021 09:37

The new version of UniDAC that contains the fix is already available for download on our website.

Post Reply