hope you fine and well,
i have an html form that contains input of type time, what is the better datatype that i can use to store the input value in MySQL ?!
below is the input:
<td align="center">Time<input type="time" name="start">
I think the best way to achieve this, still by storing datetime when you create your database (maybe you will need date later for any kind of test ) but when you want to retrive it just use the right format like this :
SELECT DATE_FORMAT(colName,'%H:%i:%s') TIMEONLY
Edit : you can use time format as well :
SELECT TIME_FORMAT(colName, 'HH:MM:SS')
Hope this helps!