Salesforce

An effort to bring a revolution in Salesforce.

Thursday, 6 April 2017

What is the formula to calculate the number of days between two dates?

Salesforce: Days between two dates

CreatedDate is not a Date datatype field it's a DateTime datatype, you need to convert it using a DATEVALUE function like this. 

Datatype = Formula
Result = Number 

TODAY () - DATEVALUE(CreatedDate) 

Error: Incorrect parameter for operator '-'. Expected Number, Date, received DateTime.


, ,

Get Gmail, Docs, Drive, and Calendar for business