Quote:
|
Originally Posted by oldnickj
In an inherited database I have a column of dates in varchar (5) i.e. 3/09 which I would like to convert to a date field. i.e 03/00/2009!
|
your best bet is to chose the 1st of the month
e.g.
3/09 --> 2009-03-01
9/09 --> 2009-09-01
12/09 --> 2009-12-01
if this works for you, then use DATE(CONCAT('20',RIGHT(yourfld,2),'-',SUBSTRING_INDEX(yourfld,'/',1),'-01'))
