The MAKETIME function returns the hour from specified argument in the AM/PM format. You can specify the INTEGER types corresponding hours, minutes and seconds as arguments; the value is returned in DATETIME.
MAKETIME(hour, min, sec)
SELECT MAKETIME(13,34,4);
maketime(13, 34, 4)
======================
01:34:04 PM
SELECT MAKETIME('1','34','4');
maketime('1', '34', '4')
===========================
01:34:04 AM
SELECT MAKETIME(24,0,0);
ERROR: Conversion error in time format.