You need to sign in to do that
Don't have an account?
add 30 days to formula
I have a formula that I am using in a visualforce page. I was able to finally able to get it to only show the date instead of the date time even though I was using just a date field. Now I need to add 30 days to it. here is my formula
{! TEXT ( Month ( DATEVALUE (account.Archieved_Date__c ))) &"/"& TEXT( DAY(DATEVALUE( account.Archieved_Date__c+30 ))) &"/"& TEXT(YEAR(DATEVALUE( account.Archieved_Date__c))) }
I also tried it like this...
{! (TEXT ( Month ( DATEVALUE (account.Archieved_Date__c ))) &"/"& TEXT( DAY(DATEVALUE( account.Archieved_Date__c ))) &"/"& TEXT(YEAR(DATEVALUE( account.Archieved_Date__c))) + 30) }
{! TEXT ( Month ( DATEVALUE (account.Archieved_Date__c ))) &"/"& TEXT( DAY(DATEVALUE( account.Archieved_Date__c+30 ))) &"/"& TEXT(YEAR(DATEVALUE( account.Archieved_Date__c))) }
I also tried it like this...
{! (TEXT ( Month ( DATEVALUE (account.Archieved_Date__c ))) &"/"& TEXT( DAY(DATEVALUE( account.Archieved_Date__c ))) &"/"& TEXT(YEAR(DATEVALUE( account.Archieved_Date__c))) + 30) }
Please take a look at the following article. It explains exactly what you are trying to do:
https://help.salesforce.com/apex/HTViewHelpDoc?id=formula_examples_dates.htm&language=en_EN#adding-dmy-to-date
Good luck and happy coding!
Best regards,
Martijn Schwärzer
P.S. If my answer helps you to solve your problem please mark it as best answer. It will help other to find best answer.
By the way, date format can be seen based on locale