Crystal Report Last Year YTD full month

In creating YTD Last Year full month formula.
If ({table1.Start_Date} in Date (Year(CurrentDate) -1, 01, 01) to DATEADD(year(CurrentDate), -1, CurrentDate - Day(CurrentDate))) then

I am getting error in part:  DATEADD(year(CurrentDate),  highlight is on Year(CurrentDate) and error is String is required here
Any Idea?
Who is Participating?
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.

TarasAuthor Commented:
I found this one work for me:
date field in dateserial(year(currentdate),month(currentdate)-13,1) to dateserial(year(currentdate),month(currentdate)-12,1-1)

But I was wondering what is wrong with my formula.?
What full month do you want from last year?

DateAdd(IntervalType, Number of Intervals, StartDateTime)

IntervalType deines the interval to add like yyyy for Year, q for quarter, etc
Number of intervals is how many to add or subtract (negative number)
StartDateTime is the DateTime to add to.

DATEADD(year(CurrentDate), -1, CurrentDate - Day(CurrentDate)))
should be

DATEADD(year("yyyy", -1, CurrentDate - Day(CurrentDate)))


 You forgot to remove the Year function from that:

DATEADD("yyyy", -1, CurrentDate - Day(CurrentDate))


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
TarasAuthor Commented:
Thanks a lot
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
Crystal Reports

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.