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

How to get a sql date from java.util.Date? 1

Status
Not open for further replies.

zhanghong920

Programmer
Nov 15, 2002
27
US
Hi,

How can I get a java.sql.Date from a java.util.Date? Thanks a lot,

zhanghong920
 
Code:
java.util.Date dt = new java.util.Date();
java.sql.Date = new java.sql.Date( dt.getTime());

[sub]1010100 1000111 1001001 1000110[/sub] [cheers]
-pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top