$date = '2010-12-03 05:12:56'; $date_parts[0] = substr($date,0,4); $date_parts[1] = substr($date,5,2); $date_parts[2] = substr($date,8,2); $date_parts[3] = substr($date,11,2); $date_parts[4] = substr($date,14,2); $date_parts[5] = substr($date,17,2); ?>