Это может помочь:
Table: records
Column date: Type date,
Column hours: Type string (am/pm format)
SELECT
date,
hours,
CONCAT(date, ' ', IF(LOCATE('pm',hours) > 0, ADDTIME(TIME(REPLACE(hours, ' pm','')), '12:00:00'), TIME(REPLACE(hours, ' am',''))))
FROM records