Date conversion in SSRS expression

Trying to get the last day of the previous month.  In SQL this works:
select dateadd(dd,-1,dateadd(mm,datediff(mm,0,getdate()),0))

When I try to use this in an SSRS expression, it doesn't work.  Here is my expression:

Any help on what I'm doing wrong???
Brenda WilkersonSR DBAAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

try this instead

=dateadd("d",-1,CDate(cstr(day( + "/1/" + cstr(year(
I think the first part should be cstr(month ..... but if that doesn't work, try this


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Brenda WilkersonSR DBAAuthor Commented:
2nd one worked and I got the date/time,
I tried to convert to shortdate string but it didn't convert:
Brenda WilkersonSR DBAAuthor Commented:
Never mind on the last comment, got it to work, just had ')' out of place.  Thanks for your help,  the following worked:   dateadd("d",-1,dateserial(year(Today),month(Today),1))
Brenda WilkersonSR DBAAuthor Commented:
Great help and quick as always, Thanks alot.....
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.