File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes Oracler Date function Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Oracler Date function" Watch "Oracler Date function" New topic
Author

Oracler Date function

Clarice Doe
Greenhorn

Joined: Dec 24, 2004
Posts: 21
I have 3 columns in a table say, A_DATE, A_TIME and A_DATETIME. The data type for all the columns is DATE.

Now I want to take the date part from A_DATE, time part from A_TIME, and insert those date & time values into A_DATETIME.

I could get the date & time part from the 2 columns using to_char funtion, but I don't know how to merge them and put it in to the third column. Any suggestions.

Thanks
Shailesh Chandra
Ranch Hand

Joined: Aug 13, 2004
Posts: 1081

I dont have database to test this but this works




Shailesh


Gravitation cannot be held responsible for people falling in love ~ Albert Einstein
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
You just want a query or you want it in your application. If its something your application needs to do then you had better do it in your code.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Oracler Date function