You need to sign in to do that
Don't have an account?

Adding a year to date and day to last day of the month
Hi,
I need to take a date field and update another date field to be the original date + 1 year. And also take the day from the original date and make it the last day of the month.
Can I do this by workflow? Or do I need to write some APEX for it?
Thanks.
This formula returns the last day on the month, probably.
DATE(YEAR(Date2__c)+IF(MONTH(Date2__c)=12,1,0),MOD(MONTH(Date2__c),12)+1,1)-1
All Answers
Well, part one is easy, use a formula date field and do a:
Date1_c + 365
Now part 2 is where your going to have issues.... I dont see how to do this, but I am sure people out here will know, but it would require a trigger I would imagine.
PB
This formula returns the last day on the month, probably.
DATE(YEAR(Date2__c)+IF(MONTH(Date2__c)=12,1,0),MOD(MONTH(Date2__c),12)+1,1)-1