+ Start a Discussion
Guilherme Eduardo de FariasGuilherme Eduardo de Farias 

Error in formula field

Hello,

I have a formula field with the formula below:

(5 * ( FLOOR((Start_Date__c- DATE(1900,1, 8) ) / 7 ) ) + MIN(5, MOD(Start_Date__c- DATE(1900,1, 8), 7 ) ) )
-
(5 * ( FLOOR((End_Date__c- DATE(1900,1, 8) ) / 7 ) ) + MIN(5, MOD(End_Date__c- DATE(1900,1, 8), 7 ) ) )

I need to separate only the working days between these dates, and put in showing in the field formulates the result, but it is giving the following error

Error: Formula result is data type (Number), incompatible with expected data type (Date).
Best Answer chosen by Guilherme Eduardo de Farias
SteveMoSteveMo
Can you post a complete screenshot of the Formula Field and the error message?  It sounds like you just selected 
Datatype = Formula
Result = Date 
instead of selecting Result = Number

All Answers

SteveMoSteveMo
Can you post a complete screenshot of the Formula Field and the error message?  It sounds like you just selected 
Datatype = Formula
Result = Date 
instead of selecting Result = Number
This was selected as the best answer
SteveMoSteveMo
Yeah, that's exactly what I said.  You need to select Result = Number
Guilherme Eduardo de FariasGuilherme Eduardo de Farias
Sorry, I still can't understand
SteveMoSteveMo
When you created the Field you selected DATE as the result type (that's won't work) you need to change the Result Type to NUMBER