10-07-2015 01:59 PM - edited 10-07-2015 01:59 PM
Does anyone have some sample code that creates a calculated date field? Such as an Age field?
I am using some starter code from here: https://community.act.com/t5/The-Act-Journal/Act-Calculated-fields-SDK-Primer/ba-p/247844
I can create numeric fields with normal math functions without any issues, but I am not sure how to set up a field that relies on date.
I tried using the following for the ColumnCalDefinition, but I always get a negative value back, and in ACT, the field does not show as a regular calculated date field.
fd.ColumnCalDefinition = "datediff(day,getdate(),[BIRTHDATE])/(365.242199)";
Any help would be appreciated.
01-02-2016 11:45 AM