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

Re: How to calculate years between two dates

$
0
0

Hi Lars,

 

I am using SP10 System - Version: 1.00.102.00.1442292917

 

Standard Function YEARS_BETWEEN not working on my system.

 

SELECT YEARS_BETWEEN (TO_DATE('2001-10-13'), TO_DATE('2003-01-14')) "years_between"FROM DUMMY;

 

Could not execute 'SELECT YEARS_BETWEEN(TO_DATE('2001-10-13'), TO_DATE('2003-01-14')) "years_between" FROM DUMMY'

SAP DBTech JDBC: [328]: invalid name of function or procedure: YEARS_BETWEEN: line 1 col 8 (at pos 7)



I think YEARS_BETWEEN - standard function would be supported in latest versions.

So I thought of creating custom procedure for older versions and

used text parsing and auxiliary table content to get required output.


As per your suggestion, I will go for custom function approach.


Thanks & Regards,

Muthuram




Viewing all articles
Browse latest Browse all 9165

Trending Articles



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