I decleared the column as "datetime",which failed to restore value like above.
+1
A:
2008-7
isn't a date. 2008-7-1
is a date (the first of July). If you want to store values like 2008-7
, you'll want a character field.
T.J. Crowder
2009-09-13 16:42:21
A:
Do you need to clean up the data?
- make it a
varchar
update t set d = concat(d, '-1')
- change it to a
date
type
ndp
2009-09-14 01:39:15