String-Date conversion help

I get the following error in a bean

on the statement

java.sql.Date.valueOf(2006-12-07)

16:06:29,298 INFO [STDOUT] java.text.ParseException: Unparseable date: "2006-12

-07"

16:06:29,298 INFO [STDOUT]at java.text.DateFormat.parse(DateFormat.java:33ng

where 2006-12-07 is the date I enter

[330 byte] By [omijoa] at [2007-11-26 13:16:34]
# 1
java.text.SimpleDateFormat has a parse() method that will convert a String to java.util.Date object according to the format specified when is is contructed. Follow the Javadoc for details.
sabre150a at 2007-7-7 17:38:42 > top of Java-index,Java Essentials,New To Java...
# 2
System.out.println(java.sql.Date.valueOf("2006-12-07"));prints:2006-12-07So I don't believe you when you say that your line (which btw doesn't even compile) is the problem.
CeciNEstPasUnProgrammeura at 2007-7-7 17:38:42 > top of Java-index,Java Essentials,New To Java...