I have some java code like this
public float getTimetaken(){
float retVal = 0;
long tempVal;
tempVal = (System.currentTimeMillis() -
last_checked_time.getTime());
retVal = (float) tempVal / 1000;
last_checked_time.setTime(System.currentTimeMillis());
System.out.println(tempVal+" " + retVal);
return retVal ;
}
mapping is like this
<field name="time_taken" type="float"><sql name="time_taken"
type="float"/></field>
tempVal is always a 4 digit number, and retVal is always 3 or less
decimal places (which it should be x / 1000)).
But when it updates the database it alwasy get float values many
decmial places (like 10) that have added values. Anyone know why?
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-user