Michael Morsberger

Compile error when trying to subtract a duration from a date before comparing to another date.

Discussion created by Michael Morsberger on Jun 25, 2012
Latest reply on Jul 3, 2012 by Guest

Error: Expression designates an object and cannot be implicitly converted to a value in this context.


When trying to compare a date to another date, I am getting this error when I'm trying to subtract time (i.e.., 24 months) from one date to compare it to the other.


Both fields are dates in the BOM.


This is occurring in a templatized rule in the instance editor.


Comparing the dates without a duration change compiles and runs successfully.

Here is an example of the rule:


"date1 minus 24 months is earlier than date2" produces the above compile error.


"date1 is earlier than date2" compiles and runs successfully.



Any help would be greatly appreciated!