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




[EMAIL PROTECTED]
04/03/2003 03:47 PM
Please respond to "OJB Users List"
 
        To:     [EMAIL PROTECTED]
        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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Reply via email to