date takes a unix timestamp as argument, so what planetsim suggested would probably not work the way you wanted it.
if that YYYYMMDD timestamp is coming from mysql, I'd recommend formatting it right when selecting records.
SELECT DATE_FORMAT(date_column, '%Y %M %d') AS fdate ...