Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Oracle Date/Time field

 
Liza_jar
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 265
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First u can retreive the date filed from date then u can apply simpledateformat and covnvert date part only.
 
Jamie Robertson
Ranch Hand
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
side note:
if your driver's getDate() function is dropping the time from your date, use the getTimestamp() method instead.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic