Skip to Main Content

Java Programming

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!

Date Formatting

807588Feb 28 2009 — edited Mar 3 2009
I have a java.sql.Timestamp object which is storing a date and a feature I am trying to implement is for users to change this date and then saving it back. To make it easier to read for the user I have used a DateFormat to display it so the format of the date changes. However, my problem arises as when I allow the user to change the date in the JTextField, how can I parse it back so that it is back in the format of the Timestamp.

When I try and save the users changes to start date, I am using a setStartDate method I have made which takes in a Timestamp object. Therefore, how can I change the String input from startDateTF which is using the DateFormat to a Timestamp object? The DateFormat I am using is
df1 = DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.SHORT)
If anybody has any suggestions or any better ways this can be acheived in terms of user interaction it would be much appreciated.

Comments

damorgan
You are using a non-Oracle certified tool to access an Oracle database on a non-supported operating system.

Why not go with supported tools and supported configurations? They have the advantage that they work.
646831
Thanks for your reply.

Here is the complete situation we are in.

We are trying to connect to Oracle's TimesTen Database from a Rails Application.
I cannot find Rails Adapter to connect to TimesTen Database.
But there is odbc adapter for Rails.

So we are planning to configure DSN here on linux for Remote Oracle and trying to connect to the remote database.

If not possible we have to try atleast both Rails App and TimesTen on the same machine.
Then also we need to go thru ODBC-adapter.

we are using isql as a simple tool to test DSN.

Thanks,
164043
The problem is not in the supportability, the problem lies in the fact that this driver is untested and doesn't work.
I was able to successfully do the trick with the ODBC driver for 10.2 but the 11g version doesn't work, it's missing
a symbol. For your information, this driver doesn't work even on OEL 5.2, which is supported. Just blasting people for using the unsupported combination will not change the fact that neither dg4odbc nor the ODBC
driver itself are working. Both are hopelessly broken.

If you ever asked yourself why is the adoption of 11g so slow, the answer is that is largely untested and significant parts of it don't work. I had a problem with fast switchover to standby which did work in one direction, but could not get back and I still have a problem with ODBC drivers which are programmed sloppily. I suggested my management not to go to 11g for at least another year. New features of 11g are fascinating but the software quality is appalling, to put it mildly. There are show stopping bugs all over the place.

Other than that, my understanding of this forum is that it is intended for a free form exchange of information. Blasting people for testing possibilities doesn't seem like the right answer to me. On the other hand, any
other answer would be inconsistent with Dan Morgan.
1 - 3
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Mar 31 2009
Added on Feb 28 2009
4 comments
81 views