MySQL Extract Day a partir da data liderando zero
DATE_FORMAT(field_name,'%Y-%m-%d')
Matteoweb
DATE_FORMAT(field_name,'%Y-%m-%d')