# Current Year YTD full month title and Last Year YTD full month title

Current YTD full month and Last Year YTD full Month:
I have two formulas for current YTD full month and last Year full month amounts.

If ({tbl1.Date} in Date (Year(CurrentDate) , 01, 01) to CurrentDate - Day(CurrentDate)) then
{tbl1.Amount}
Else
0;
I need formula that will put title on this column.
It means title should be if date is e.g. =  04-02-2015 title should be: "Mar - 2015"

Last year YTD full month.
If

{tbl1.Date} in Date (Year(CurrentDate)-1, 01, 01) to DateSerial (Year(CurrentDate)-1, Month(CurrentDate),0) then

{tbl1.Amount}
Else
0;

I need formula that will put title on this column too.
It means title should be if date is e.g. =  04-02-2015 title should be: "Mar - 2014"
###### 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.

Commented:
Try this
Current Year to Date
CStr(CurrentDate - Day(CurrentDate), "MMM - yyyy")

Last Year to Date
CStr(DateSerial (Year(CurrentDate)-1, Month(CurrentDate),0) , "MMM - yyyy")

mlmcc
0

Experts Exchange Solution brought to you by

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

Author Commented:
Thanks a lot.
Excellent as always .
0
###### 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.