Incorrect results with TIMESTAMPDIFF in JBEDS

Solution Verified - Updated -

Issue

  • I am getting incorrect results when using TIMESTAMPDIFF in JBEDS:
select TIMESTAMPDIFF(SQL_TSI_DAY,parseDate('2012-01-01', 'yyyy-MM-dd'),parseDate('2304-04-12', 'yyyy-MM-dd'));

result = 106751

If you increase the end date by 1 day:

select TIMESTAMPDIFF(SQL_TSI_DAY,parseDate('2012-01-01', 'yyyy-MM-dd'),parseDate('2304-04-13', 'yyyy-MM-dd'))

result = -106751.  

I would expected the answer to be 106752

Environment

  • JBoss Enterprise Data Services (JBEDS) 5.3.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content