You need to sign in to do that
Don't have an account?
monkeyking
Incorrect parameter type for operator '-' Expected Number, Received Date error in Formula Field
Hello All,
I have a formula field in which i have to calculate the number of days between the two dates excluding weekends.
I got the formula from Salesforce docs to calculate the number of working days.
Now when i implement that in my org i am getting the below error,
Can anyone please give the solution? How to get rid of this error?
Thanks in advance.
Regards,
Rajkumar CV
I have a formula field in which i have to calculate the number of days between the two dates excluding weekends.
I got the formula from Salesforce docs to calculate the number of working days.
Now when i implement that in my org i am getting the below error,
Can anyone please give the solution? How to get rid of this error?
Thanks in advance.
Regards,
Rajkumar CV
Looks like you have an extra bracket in between and leaving the '-' alone, that's the error. Try the below formula. Use programs like VSCode, Notepad++ for indentation which really helps.
Greetings to you!
rjk.cv7, the issue has to do with this field's data type:
- Please check if any field has data type is Date/Time
- You created Date as a Date/Time field when it should be a Date field. Just change the data type of this field to be a Date. It will work fine.
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks and Regards,
Deepali Kulshrestha.