hi.. i need help in converting
string to date.. i just need someone to check whether my code is correct or not..
here are my codes:
Date today = new Date();
DateFormat formatLong= DateFormat.getDateInstance(DateFormat.SHORT);
java.sql.Date curDate = java.sql.Date.valueOf(formatLong.format(today));
//and below is the storing part..
String query1 = null;
query1 = "Insert into ITS.dbo.orderDetails values(?)";
PreparedStatement stmnt = conn.prepareStatement(query1);
stmnt.setDate(1, curDate);
stmnt.executeUpdate();
anyone ..pls reply .. i need it urgently...
[ March 11, 2005: Message edited by: Bear Bibeault ]