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

Re: First Date of the Given date and month

$
0
0

Hello,

You could use the LAST_DAY function to derive the first day of the month.

 

For ex: if you want to get the first day of the last month i.e. 01-JUN-2014 .

( The current date is 07-JULY-2014)

 

SELECT ADD_DAYS(LAST_DAY(ADD_MONTHS(CURRENT_DATE, -2)),1)

FROM dummy

 

 

Hope this helps.

 

Thanks,

Vivek Deshpande


Viewing all articles
Browse latest Browse all 9165

Trending Articles



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