IGNORE ALL THIS - I WAS SILLY & HAD A MISPLACED BRACKET - have updated it below & it's correct now, so I thought I would leave the q here anyway, but this isn't a question any more...
I have 2 user defined functions (as below) which I want to use to be able to convert from default java format date time to valid db2 date string, which seem like they should be simple enough.
create function GETMON ( mon varchar( 3 ) )
returns varchar( 2 )
GETMON works completely fine & as expected, but when I run "values DATEFORMAT( 'Thu Jan 01 10:00:00 EST 1970' )", I get the error SQL0433N Value "Jan-1970-10.00" is too long. SQLSTATE=22001
This seems weird to me, since the input & return strings are well under 50 chars, and according to my understanding, 'Jan-1970-10.00' should not appear anywhere in the return, but I could totally be missing something - I'm only starting with UDF's today...