Set a field as variant in an equation

12 posts / 0 new
Last post
Brian Element's picture
Brian Element
Offline
Joined: 07/11/2012 - 19:57

You need to change the equation as you are using the variable inside of the equaiton so the equation is seeing sDate and not the contents of the variable.

Change it to:

field.Equation = "@If(FECHA_PAGAR<=""" & sDate & """;@Age(FECHA_PAGAR;""" & sDate & """);0)"

Remember that dates need to be within double quotes in the equation, if there are no double quotes then the equation editor will think it is a number and not a date.

Pages