Using CalculateDateTime (in an If condition) in a form "When user loads form" gives me the following error. When I take out the CalculateDateTime, the form works fine. I have verified and reverified that MedBIProcData1.DoB is DateTime. The arguments for units, before/after, and (date) from were all entered by the wizard.
CalculateDateTime(18,DateTimeUnits.Years, DateTimeDirection.Before, DateTime.CurrentDate) greater than or equal MedBIProcData1.DoB
Failed to execute deployed method 'FormLoaded', using entity 'MedBI'. Exception 'Cannot cast the DateTime 'Never' to a Double' occurred when attempting to 'Execute workflow '77d823be-6626-44c3-9401-fe6ee69c43a6''. Cannot cast the DateTime 'Never' to a Double