permaculture playing cards
The moose likes JDBC and Relational Databases and the fly likes Timestamp problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Timestamp problem" Watch "Timestamp problem" New topic

Timestamp problem

Tony Evans
Ranch Hand

Joined: Jun 29, 2002
Posts: 588
I am building the Dukes bank example using an Oracle Databsae.

In the Database they have a datatype TIMESTAMP.

In the code they have this data set as DATE. this is causing an error to be thrown as invalid column type.

I guess one way would be to change DATE to TIMESTAMP

Is there another way round this.

Thanks for any help Tony
Avi Abrami
Ranch Hand

Joined: Oct 11, 2000
Posts: 1138


I guess one way would be to change DATE to TIMESTAMP

Don't you mean: change TIMESTAMP to DATE?
Oracle does also have a DATE data-type -- which contains a "date" part and a "time" part. The TIMESTAMP type is new in Oracle 9i and adds a "fraction-of-second" part to the "date" and "time" parts. So go ahead, change your database column's data-type from TIMESTAMP to DATE.

Good Luck,
I agree. Here's the link:
subject: Timestamp problem
It's not a secret anymore!