Quantcast
Channel: SQL Server Reporting Services, Power View forum
Viewing all articles
Browse latest Browse all 10045

Two Digit Month

$
0
0

I am setting a parameter in my SSRS report to the 1st day of the previous month, but the final format I need is yyyymm. I can get yyyym with the following, but have been unable to find a way that actually works to get a two digit month instead:

=DatePart("yyyy", DateAdd("m", -1, DateSerial(Year(Today), Month(Today), 1))) & DatePart("m", DateAdd("m", -1, DateSerial(Year(Today), Month(Today), 1)))

So final format for 6/1/2016 would be 201606 rather than 20166.



Viewing all articles
Browse latest Browse all 10045

Trending Articles



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