Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 2161

Re: Days in Month - HANA?

$
0
0

Hello Vishal,

 

I was just able to got that working in a HANA Calculayed Column please use below.

 

if( "ReportingMonth"=midstr(string(now()),6,2) And "ReportingYear"=midstr(string(now()),1,4),

midstr(string(now()),9,2),

(if(int(midstr(string(now()),6,2))=12,

'31',

Midstr(String(adddays(Date((midstr(string(now()),1,4))+'-'+string(int(midstr(string(now()),6,2))+1)+'-01'),-1)),9,2))))

 

Replace ReportingMonth and ReportingYear with your database field.

 

Regards

Niraj


Viewing all articles
Browse latest Browse all 2161

Trending Articles



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