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

Re: Calculate YeartoMonth

$
0
0

I don't have the SQL sytstem infront of me to test the code.. But try using the below one and see if it brings the last day of the previous month?

 

DATEADD(MONTH, DATEDIFF(MONTH, 0, GETDATE()), -1)


Viewing all articles
Browse latest Browse all 9212

Trending Articles



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