This is a discussion on How to chang a String type to a Date type in jsp? - Weblogic ; i'm a newer to the jsp,please help me. i want to input a String like that "2006-6-30" in the form,then the jsp request the input,and save it to Oracle Database. But i don't know how to save a String to ...
i'm a newer to the jsp,please help me.
i want to input a String like that "2006-6-30" in the form,then the jsp
request the input,and save it to Oracle Database.
But i don't know how to save a String to a Date type field in database.
i write some code here,i know it's wrong,but i don't know how to
correct.
<%
adddate=request.getParameter("adddate");
stmt.executeUpdate("INSERT INTO news(newsid,adddate)
VALUES(newsid.nextval,'"+adddate+"')");
%>