Quantcast
Channel: SCN: Message List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 9165

WORKDAYS_BETWEEN and null values

$
0
0

I recently discovered that the WORKDAYS_BETWEEN function has an unexpected handling of null values as it returns 0 if both dates are null.

 

Select WORKDAYS_BETWEEN('01',null,null) FROM DUMMY

Returns 0.

 

In contrast


Select SECONDS_BETWEEN(null,null) FROM DUMMY

and


Select DAYS_BETWEEN(null,null) FROM DUMMY

return null.

 

Even more the WORKDAYS_BETWEEN function returns null if only one of the two dates is null. This behavior should be corrected as it

is inconsistent and makes things complicated when calculating averages.


Viewing all articles
Browse latest Browse all 9165

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>