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!

return current date

Status
Not open for further replies.

gi11ies

Programmer
Mar 26, 2002
52
Hi

Im wondering if anyone can tell me a method to return the current date, in Day, Month, Year format. Passing it as a date parameter so it can be entered into a 'datetime' field on an SQL Server database.

GM

 
Hi,
try this out..
java.sql.Date date = new java.sql.Date(java.util.Calendar.getInstance().getTime().getTime());

Then u can send the date to the date time field in the sql server.

Hope this helps
Reddy316
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top