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