Why is there no consistency between how parameters are processed in DATEDIFF and TIMESTAMPDIFF in singlestore?

25 Views Asked by At

SELECT TIMESTAMPDIFF(DAY, '2014-12-04', '2014-12-05') as DAYS_DIFF returns 1 ,but SELECT DATEDIFF('2014-12-04', '2014-12-05') as DAYS_DIFF returns -1.

Why does TIMESTAMPDIFF do date2-date1 whereas DATEDIFF does date1-date2?

Why does this inconsistency exist?

0

There are 0 best solutions below