Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

convert String to TIMESTAMP

 
arjun gaur
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a combo box that specifies time in the form : 07:00,09:15 so on..
i have table in oracle database:
create table Appointment(
App_ID number primary key,
Doctor_ID number,
Patient_ID number,
App_Date Date,
App_Time TIMESTAMP,
App_Charges number);
now i want to convert the App_Time from combo box to TIMESTAMP to store in database..
Please help me what to do.
 
arjun gaur
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please let me know..
 
Ron McLeod
Bartender
Pie
Posts: 1048
65
Android Eclipse IDE Java Linux MySQL Database Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should start by looking at SimpleDateFormat, then maybe take a look at these Java Date And Calendar Examples. That will be you a Date object. You will then need to convert it to a JDBC Timestamp - this example related to Timestamp should help.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic