vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi, Is your object a java.util.Date, a java.sql.Date, or a java.sql.Timestamp? Do you want the column in the database to store only a date, or combined date and time? If you want the column to store a combined date and time, you should define it as TIMESTAMP WITH TIME ZONE unless you have some very unusual need to have a timestamp that represents a different moment in each time zone. Some sample code and your exception (with stack trace) would help, too. -Kevin >>> Ayd*n Toprak <aydin.toprak@intengo.com> 10/13/05 1:20 AM >>> hii, I am newbie for jdbc-postgres and looking for some help about timestamp type of posgresql..... my porgram makes a data object, and then insert this object to the db. however, I couldnt been able to insert date object directly to the db as timestamp ... do I making something wrong ? .. or is there another type to keep full date of java, in the Postgresql Db. Thank You. ---------------------------(end of broadcast)--------------------------- TIP 6: explain analyze is your friend ---------------------------(end of broadcast)--------------------------- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to majordomo@postgresql.org so that your message can get through to the mailing list cleanly |
| ||||
| Kevin Grittner schrieb: > Hi, > > Is your object a java.util.Date, a java.sql.Date, or a > java.sql.Timestamp? Do you want the column in the database to > store only a date, or combined date and time? If you want the > column to store a combined date and time, you should define it > as TIMESTAMP WITH TIME ZONE unless you have some very > unusual need to have a timestamp that represents a different > moment in each time zone. > You should have mentioned, that for the correct use of timestamp with timezone, he needs the jdbc-driver from the CVS. As far as I know, the bugfixes are not in the released drivers, yet. And I would use TIMESTAMP without a time zone, in the case I know all database clients are in the same time zone. Regards, Roland. -- Roland Walter phone: +49 (0) 22 25 / 88 2-41 1 MOSAIC SOFTWARE AG fax: +49 (0) 22 25 / 88 2-20 1 Am Pannacker 3 mailto: rwa (at) mosaic-ag (dot) com D-53340 Meckenheim http://www.mosaic-ag.com ------- L E G A L D I S C L A I M E R --------- Die Informationen in dieser Nachricht sind vertraulich und ausschliesslich fuer den Adressaten bestimmt. Kenntnisnahme durch Dritte ist unzulaessig. Die Erstellung von Kopien oder das Weiterleiten an weitere, nicht originaere und benannte Adressaten ist nicht vorgesehen und kann ungesetzlich sein. Die Meinungen in dieser Nachricht stellen lediglich die Meinungen des Senders dar. Falls Sie vermuten, dass diese Nachricht veraendert wurde, setzen Sie sich mit dem Absender in Verbindung. Der Absender uebernimmt ohne weitere Ueberpruefung keine Verantwortung fuer die Richtigkeit und Vollstaendigkeit des Inhalts. Unbefugte Empfaenger werden gebeten, die Vertraulichkeit der Nachricht zu wahren und den Absender sofort ueber einen Uebertragungsfehler zu informieren. ------------------------------------------------------ ---------------------------(end of broadcast)--------------------------- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq |