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

Re: Exact Months between two dates

$
0
0

Can you try the below. Assume that each month is having 30 days

 

SELECT FLOOR(DAYS_BETWEEN( TO_DATE('2016-01-31','YYYY-MM-DD'),TO_DATE('2016-03-30','YYYY-MM-DD')) / 30 )

FROM DUMMY;

 

Regards,

Nithin


Viewing all articles
Browse latest Browse all 9165

Trending Articles



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