This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JDBC and the fly likes JDBC( sql.Date and util.Date) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "JDBC( sql.Date and util.Date)" Watch "JDBC( sql.Date and util.Date)" New topic

JDBC( sql.Date and util.Date)

Prasath Manohar

Joined: Mar 21, 2006
Posts: 2
Can I store the System's current Date to Oracle DB.If so can I use both sql.Date and util.Date in the same jdbc program,try to explain me with an example...
Scott Selikoff
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3703

Do you want the application server's date/time or the database server's date/time, because both are available. Oracle has a sys time command whereas java just requires you create a new date. Depending on how you want to use it, you might consider a database solution that automatically inserts in a timestamp when the record is inserted.

My Blog: Down Home Country Coding with Scott Selikoff
I agree. Here's the link:
subject: JDBC( sql.Date and util.Date)
Similar Threads and - Difference
util.Date to sql.Date
util.Date to sql.Date
Difference between sql.Date and util.Date
Converting String to util.Date and then sql.Date