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
Supriyo Ghosh 9Supriyo Ghosh 9 

Days count in a Formula field

HI,

I am having one picklist field in lead object.Values are Open,Accept,Working,Converted.Based on this fields value I am capturing dates also.Now I want to create one formula field which will show me how many days this leads are having in which status.Means How many days it is in Open Status,in Accept status.

if(ISPICKVAL(Status, 'Accept') , DATETIMEVALUE( Date_of_Staring_Working__c) - DATETIMEVALUE( Date_of_Acceptance__c),DATETIMEVALUE( TODAY()) - DATETIMEVALUE( Date_of_Acceptance__c))

I have written this but it is not working.I will create different formula fields for capturing the days.Please help.
AbhishekAbhishek (Salesforce Developers) 
Try the suggestions as mentioned in the article,

https://help.salesforce.com/articleView?id=formula_using_date_datetime.htm&type=5

For further reference, you can check this too,

https://help.salesforce.com/articleView?id=formula_examples_dates.htm&type=5


I hope you find the above information is helpful. If it does, please mark as Best Answer to help others too.

Thanks.