John,
Welcome to JavaRanch!
Without using any deprecated methods or constructors (such as the very attractive constructor of the
java.sql.Date class all of those attractive parts of the
java.util.Date class), perhaps an easy route would be to construct a new
java.util.Calendar object, parse your
YYYY-MM-DD String for the numbers and use them to invoke
Calendar::set( int , int , int ) . Then, get the date as a
long with
Calendar::getTimeInMillis() and finally construct a new
java.sql.Date object with the constructor that takes a
long.
Your
JDBC driver should know what to do with a
java.sql.Date object - you just have to tell it where to add the value.
Any luck?