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
Alfia Quadri 11Alfia Quadri 11 

Adding and subtracting days from date

I have a 2 formula date field, I want to add days and subtract days

contract_date = 12/31/2022
new_date = contract_date+1      (formula filed, adding 1 day)
it is returning 1/20/0001

contract_date = 12/18/2022
new_date = contract_date-14   (formula filed, subtracting 14 day)

its returning 7/20/2012

 

 

PriyaPriya (Salesforce Developers) 

Hi Alfia,

You can create one formula field "New Added Date" of Date Type and write the below logic 
 

contract_date +1
Simillary you can create another formula field of Date type and in that, write below logic :-
contract_date - 14
 

Kindly mark it as the best answer if it works for you.

 

Thanks & Regards,

Priya Ranjan