How to assign NULL value to field Date type

Hi,

I use Reformat to assign NULL value to Date field type, but it is show error.
I write as below;
$out.0.D_DATE = iif($in.0.ACCOUNT!=‘’,str2date(getParamValue(“PCSDT”),“yyyyMMdd”),null);

the error show as below;
--------------------------------- Error details ----------------------------------
Component [Reformat:REFORMAT4] finished with status ERROR.
Message: Transform failed!
Interpreter runtime exception on line 6 column 5
D_DATE has incorrect default value
----------------------------------------------------------------------------------

Please help advise, how to set null value to Date field type.

Thank you

Hi Jean,

Your problem is probably caused by the “Nullable=false” setting on “D_DATE” field. When you try to assign NULL value by CTL code, CloverETL is trying to use instead default value of that field. But because you have default value null or empty it fails with sent error message.

So you can either enable “Nullable” or provide valid default date. Both can be set in “Edit metadata” dialog.

Thank you