Convertion date format in jsp
Posted on 2003-03-25
My system use Apache Tomcat 4.1 and MySQL as a server.MySQL also keep the data that had been added and deleted.In database,date are save in yy/mm/dd.But in my login form,user has to input the date in dd/mm/yy format by the date given in the table form.The user has to choose the date from the calendar form in login form and the date will display in the text box.
The coding for this condition is shown as below:
tkhMohon = date
For login form,i use jsp as a language and the date format is dd/mm/yy.But when date has been added in the form,the database can't read the date format as dd/mm/yy.The problem occured is show as below.
If we input the date as 25/03/2003.The data will save as 2005/03/20.So, how to make the database read the data in the right condition as dd/mm/yy?