prashant04
asked on
How to get the month end date in SSRS
How to get the current month end date in SSRS ir-resepective of month date
Ex: if today is 26-0-2011 then result should be 30-04-2011
Ex: if today is 26-0-2011 then result should be 30-04-2011
This site has a few tricks for this sort of thing: Extended date functions
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
instead fo "getdate()" you can give any date to get its month end day.
for example
select dateadd(dd,-1,dateadd(mm,d atediff(mm ,0,dateadd (mm, 1, '6/20/2011')),0)) [LastDate]
OR
select dateadd(dd,-1,dateadd(mm,d atediff(mm ,0,dateadd (mm, 1, '5/20/2011')),0)) [LastDate]
for example
select dateadd(dd,-1,dateadd(mm,d
OR
select dateadd(dd,-1,dateadd(mm,d