mysql month zero pad code example Example: mysql extract day from date leading zero DATE_FORMAT(field_name,'%Y-%m-%d')