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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

util.Calendar to sql.Date 1

Status
Not open for further replies.

joelmac

Programmer
Jun 4, 2002
92
CA
hi there,

I'm collecting the month, day, year values from a web page and creating a Calendar object. I want to store that date in a MySql database so i have to convert it to a java.sql.Date right?? What's the easiest way to do that? ________________________
JoelMac
 
new java.sql.Date(java.util.Calendar.getInstance().getTime().getTime())

will give you that current date as an example. Salih Sipahi
Software Engineer.
City of Istanbul Turkey
openyourmind77@yahoo.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top