Update date in MySQL to contain leading zeros -




let's have column col1 in table tab1 has following mixed format dates:

2015-03-03 2015-02-03 2017-3-6 2015-03-04 2017-11-6 

what mysql query update column more consistent, dates contain leading zeros

you should storing these date field begin anyway here's query

update `tab1` set `col1` = date(`col1`); 




wiki

Comments

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -