Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

String to java.sql.Date

Status
Not open for further replies.

stephenbruceburch

Technical User
Jun 1, 2002
11
US
I need to format a string into a java.sql.Date format. I have used the SimpleDateFormate parser to give me a java.util.date, but I don't know how to change it to the sq.Date. I tried:
java.sql.Date date = (utilDate);
where utilDate is the java.util.Date. Any help would be greatly appreciated.
 
try this: java.sql.Date date = new java.sql.Data( utilDate.getTime() );


-gc "I don't look busy because I did it right the first time."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top