This is more for my own benefit than for anyone else, but I can see this question cropping up a few more times over the next few months. The issue is that I have a table containing an ISO date and have to populate a legacy table in which the date is represented as a ten character string (YYYY-MM-DD).
select trim(char(year(iso_date))) || '-' || substr(digits(month(iso_date)), 9, 2) || '-' || substr(digits(char(day(iso_date))), 31, 2) from ...
The digits function returns a fixed-length character-string representation of the absolute value of a number. then all you need to do is identify the bit of the string that you need to use.