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 Oracle Date/Time field 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 "Oracle Date/Time field" Watch "Oracle Date/Time field" New topic
Author

Oracle Date/Time field

Liza_jar
Greenhorn

Joined: Sep 10, 2002
Posts: 1
I need to display the TIME in jTable.
Im connecting via Oracle Thin.
My table is using a date field (e.g
APPOINTMENT
APP_TIME -DATE(7)
...
The jTable only display the date but not the time.
Im stuck. Pls. help.
TIA
Graham Thorpe
Ranch Hand

Joined: Mar 25, 2002
Posts: 265
First u can retreive the date filed from date then u can apply simpledateformat and covnvert date part only.
Jamie Robertson
Ranch Hand

Joined: Jul 09, 2001
Posts: 1879

I have a hunch you are using the java.sql.Date toString() method which returns a String representation of the date in the format "yyyy-mm-dd".
how to work the simple date format:

Jamie
Jamie Robertson
Ranch Hand

Joined: Jul 09, 2001
Posts: 1879

side note:
if your driver's getDate() function is dropping the time from your date, use the getTimestamp() method instead.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Oracle Date/Time field
 
Similar Threads
JTable
Date in JTable
JTable
JTable dates
JTable