date(substr(abcd,1,4)||'-'||substr(abcd,5,2)||'-'||substr(abcd,7,2))
Note that the dashes say the date string is in ISO format - yyyy-mm-dd . Other date formats as USA with slashes - mm/dd/yyyy - and EUR with dots - dd.mm.yyyy.
------------------------------
JAMES CAMPBELL
------------------------------