Is there a way to get last date of month from given date in RDLC-report expression.I have a field 'toData' which have date e.g if its value is: 10-04-2017.It should show the last date of month which is 30-04-2017 in report.
Asked
Active
Viewed 1,730 times
0
-
1Possible duplicate of [How do I get the last day on the month using SQL Reporting Services](http://stackoverflow.com/questions/2852874/how-do-i-get-the-last-day-on-the-month-using-sql-reporting-services) – Equalsk Apr 10 '17 at 14:25
-
I want to show last day of month of date having field 'toDate' not current's month. – Syed Kamran Ahmed Apr 10 '17 at 14:55
-
Did you read the thread? It shows how to work it out for any given date, it's just that in the example they give it `Today` to get the current month, obviously you would use `toDate`. – Equalsk Apr 10 '17 at 15:00
1 Answers
0
Getting the Last Day of the month for a given date
=DateSerial(Year(yourDateHere), Month(yourDateHere) + 1, 0)
Formatting the date to dd-MM-yyyy like "01-01-2017"
=FORMAT(DateSerial(Year(Fields!Date.Value), Month(Fields!Date.Value) + 1, 0), "dd-MM-yyyy")

shakawy
- 1
- 2