aspose file tools*
The moose likes JDBC and the fly likes java.sql.Date Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "java.sql.Date" Watch "java.sql.Date" New topic
Author

java.sql.Date

lu v thuan
Ranch Hand

Joined: Oct 25, 2001
Posts: 32
Hi friends
I have a Date field in Oracle. I use JDBC to get that field.
I would like to display the format like this :mm/dd/yyyy
but in java I can display as :yyyy-mm-dd
I tried to used getMonth(),getDate,getYear() to get the desired
format
Could anyone pls tell me another way ?
Thanks in advanced
Peter den Haan
author
Ranch Hand

Joined: Apr 20, 2000
Posts: 3252
new java.text.SimpleDateFormat("MM/dd/yyyy").format(date);
- Peter
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java.sql.Date