function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
lil_rangerlil_ranger 

Subtract Date

Is there a way to subtract 30 days from a date field in a Visualforce email template?  I have a close date that I want to subtract 30 days from.

 

Thanks!

Best Answer chosen by Admin (Salesforce Developers) 
bob_buzzardbob_buzzard

You should just be able to use a simple formula for this.  Something like:

 

 

{!MyObj.My_Date__c - 30}

 

replace MyObj.My_Date__c with your date field.