Trigger formatting date

1
create trigger tr_Fmt_Data before insert
on Tempos
for each row
set new.Mes = date_format(new.Datas, "%M");

insert into Tempos (Datas) values("2017-10-03");

Would it be possible to help me complete the above trigger? I want to format the date entered in the Dates field, assuming the Month field only the month of the Date.

    
asked by anonymous 04.10.2017 / 17:33

0 answers