I apologize in advance for what probably seems like a duplicate question, but I have attempted every solution I could find, and nothing seems to be working.
I have a table with time stored separately as a varchar. The value of a particular record is "6:00 PM"
I have tried every function and conversion in MySQL, but cannot get this thing to convert to military time.
-- Let's say `time` is the value "6:00 PM" -- This should return "18:00" SELECT DATE_FORMAT(STR_TO_DATE(`time`, '%l:%i %p'), '%k:%i') AS milTime;