I have an html page having a form with input type="time". This time is in 12 hr format by default.
The user will select the time and it should get stored in the MYSQL database. In my database, I have created a table with the field called "bookingTime" and its datatype is TIME.
I am trying to write the java code to store the time in the database.
The problem is, when I select the time (for Ex. 03.30 PM) on the HTML page, it is being received in the backend as "1970-01-01T20:30:00.000Z".
I am not able to parse this and store the actual time(which is 15:30:00) in the MYSQL database.
Can someone provide me the java code to do this?