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