I need to extract the hours and minutes of a timestamp in mysql, I tried to use maketime ();
CREATE OR REPLACE FUNCTION agendar(dia timestamp) returns bool as
$$
declare
hora time := extract(hour from dia);
minuto time := extract(minute from dia);
horaminuto := maketime(hora,minuto,0);
but accuses of incorrect syntax. I need to extract the date and time to compare and see if the timestamp schedule has reached a time limit or not. For example, a trade that opens at 9:30 in the morning, I need to check if the time that was passed in the timestamp happens before or after that time