I've got dates in my database stored as varchars in the format: dd/mm/yyyy e.g. 1/3/2015
I'm trying to change the format to yyyy/mm/dd so I can convert them into timestamps.
When I try this:
SELECT FORMAT (date, 'dd/mm/yyyy', 'yyyy/mm/dd' ) AS t FROM tracker;
It returns only one number per record which happens to be the day. So if I run the query on the following dates: 2/3/2015 and 6/2/2014 then the query returns 2 and 6.
How can I get it to return the correct format?
FORMATis for numbers. Did you mean to useDATE_FORMAT?SELECT date FROM tracker LIMIT 10&DESCRIBE tracker.