You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by vb...@siuh.edu on 2003/04/03 20:40:50 UTC
Re: OJB date => jdbc date is not saving time part(Scanned for viruses: Notes
Admin)
If I am not mistaken java.sql.Date does not have a time part. You can use
java.sql.Timestamp or you can use java.util.Date (which contains date &
time) and use <field-descriptor> attribute
conversion="org.apache.ojb.broker.accesslayer.conversions.JavaDate2SqlTimestampFieldConversion"
Hope this helps,
Vladimir Berezniker
Sr. Programmer Analyst
Staten Island University Hospital
gfaerman@fys.com.ar
04/03/2003 03:47 PM
Please respond to "OJB Users List"
To: ojb-user@db.apache.org
cc:
Subject: OJB date => jdbc date is not saving time
part(Scanned for viruses: Notes Admin)
Hi all,
I´m saving a java.sql.date to an Oracle field using OJB DATE mapping.
The java.sql.date ojbect is being set with system date & time.
obj.lastModifDate(new java.sql.Date(System.currentTimeMillis())); //
Lets
say ,with the right mask it would be 03/04/2003 15:40:17.
When we retrieve the date from the database it´s being recorded as
03/04/2003 12:00:00, the real time is lost.
I really do not know how to fix it. Could anyone help us on this?
Regards,
Gustavo Faerman
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org