I have a date in a table formatted like this:
I need to get the year – 1990 in my MySQL statement. I tried:
year(tblPhotoManage.Date) AS cpYear
Obviously this won’t work. How can I get the year from this date format?
First convert the string that looks a bit like a date into a MySQL DATE datatype, then using the
YEAR() function that only works on DATE/DATETIME datatypes to get the year