Forum Discussion
Switch not working in a calculated column
- 6 years ago
You have an extra () after the Opportunity Creation Date field. Use this:
= Duration.Days(DateTime.Date([Opportunity Create Date])-DateTime.Date([Actual Close]))that will return the number of days as a whole number.
edhans So, on my first attempt, here is what I got. Just trying to use a simple "date diff" type of formula for now. Bpth columns are fomatted as "date" (not datetime). No syntax errors, but the new column says "Error".
And FYI, using a custom color versus the actual conditional column wizard as it does not seem the wizard allows for this type of comparison between two dates?
=Duration.Days(Duration.From(DateTime.Date([Opportunity Create Date]())-DateTime.Date([Actual Close])))
Expression.Error: We cannot convert the value #date(2017, 4, 27) to type Function.
Details:
Value=4/27/2017
Type=[Type]
You have an extra () after the Opportunity Creation Date field. Use this:
= Duration.Days(DateTime.Date([Opportunity Create Date])-DateTime.Date([Actual Close]))
that will return the number of days as a whole number.