I have the following query which works fine, but when I try to concatenate the finishing hour of the reservation, it doesn't work anymore. I'm sure it's a type but I can't find it:
SELECT RESERVATIONID, USERID, CLASSNAME, GRADENAME, date_format(RESERVATIONDUEDATE, '%e - %M - %Y, %l:%i %p') + ' - ' + date_format(RESERVATIONEXPIREDATE, '%l:%i %p') resduedate
FROM reservation join class on
reservation.CLASSID = class.CLASSID
join grade on
reservation.GRADEID = grade.GRADEID
WHERE USERID = 'xxx'
AND RESERVATIONDUEDATE > CURDATE()
The output for that column is 32
when it should be the complete date plus the time.
Any ideas as to what might be wrong?