Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to convert number of hours to date format?

843854Sep 21 2004 — edited Jun 2 2006
Let's say i have a table named tblDate and has 2 columns: date_FirstDate and date_Hours.

im asking how do u convert number of hours to a date format in sql query?

Let's say the value of date_FirstDate is 09-21-2004 09:22:54 AM and the value of date_Hours is 72.
what i want is to convert the date_FirstDate into number of hours then add it to date_Hours. and then i want to convert back the total of hours to date format.

How will i do that in sql query statement?

i know this is possible in sql coz getting the difference between two dates can be done in sql:
DATEDIFF(date1, date2, hh)
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 30 2006
Added on Sep 21 2004
9 comments
909 views