Inserting a time into mysql database in java
问题 I want to insert a time which is taken from a textbox to the mysql database TIME column. I suppose I need to convert String to TIME like converting String to Date in mysql using "STR_TO_DATE" in the query. I looked for answers but I didn't get the answer I required. Edit: SQL from comments: "insert into schedules ( courseid, batch, subjectid, teacherid, stime, etime, date, location, building, department, hall, status ) values ('" + getCourse() + "','" + getBatch() + "', '" + getSubject() + "'