Hello Subrat,
your function does not work, because the format provided for the TO_DATE function does not match your input date. The conversion will fail. You can test that using the function in a select executed in the console: SELECT your_function(DATE_NEW => '20160617') FROM dummy;
Your function should look like:
FUNCTION "MISC"."test.misc.functions::convertDatetoExternal" ( DATE_NEW varchar(8) ) RETURNS DATE_1 varchar(10) LANGUAGE SQLSCRIPT SQL SECURITY INVOKER AS BEGIN DATE_1 := to_varchar(to_date(:DATE_NEW, 'YYYYMMDD'), 'YYYY.MM.DD'); END;
Regards,
Florian