Analytical Engine Error. Variant conversion failed.
CAUSE:
When the ApplySimple Date attribute is defined, the Strategy Engine automatically defines the Form Format of the attribute as "Datetime" because the raw data is being pulled from a Data column. However, the ApplySimple statement is running a database-specific function(s), and with this example, changing the data type from Datetime to Char. This causes the Engine to incorrectly try to convert the Char being returned by the database into a Datetime format.
ACTION:
When the ApplySimple attribute is defined, change the form format type from Datetime to the appropriate value depending on the applysimple function if the function is returning data that is formatted differently than how it is stored in the warehouse.
The Editor automatically selects Datetime because the only thing that it is aware of is that it is using a Datetime column, and passing it through another Warehouse-side function. It does not know what the function is. Therefore, the developer must be aware that Strategy Developer will not automatically know if the values are going to be converted on the return to a different data type than how it is stored in the warehouse.
Thus, to obtain the desired results, go back into the attribute and change the form format to Text: