This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes Use of sql.Date Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Use of sql.Date" Watch "Use of sql.Date" New topic

Use of sql.Date

Melody Siu

Joined: Nov 06, 2003
Posts: 21
Hi, is there any benefit for having the sql.Date object exposed to the web tier after object is retrieved from its persistent storage versus using Calendar object through out except in the block of code that needs to deal with sql.Date (i.e. insert/update sql methods).
Wayne L Johnson
Ranch Hand

Joined: Sep 03, 2003
Posts: 399
I think your analysis is correct: "java.sql.Date" should be used as close to the database tier as possible, and exposed to the outside world as another class instance, such as "java.util.Calendar".
Have you checked out Aspose?
subject: Use of sql.Date
It's not a secret anymore!