db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Caserta <smoothie...@yahoo.com>
Subject Re: Date error
Date Fri, 16 Dec 2005 01:53:34 GMT
I had the same issue. My issue was the date being
saved was a Java Utility date. So I converted the
utilty date to a Java SQL date, them used the string
representation of the date. This worked for me..

java.sql.Date effDate =
DateCode.javaSqlDateFromJavaUtilDate(effectiveDate));
criteria.add(Peer.POL_EFF_D, effDate.toString()); 

Hope this helps..
Jim

--- Jakub Piechnik <piechutm@wp.pl> wrote:

> Hello
> 
> I've got a table with field of DATE type.
> Everythings was oki till I 
> decied to put this field as one of primary keys
> (with DECIMAL field). 
> After that, when I was trying to insert anything
> into my table - I've 
> got the following error:
> com.workingdogs.village.DataSetException  Bad date
> value - Java 
> Timestamp Objects cannot be earlier than 1/1/70
> even though that I was using new Date() as value to
> initialize new 
> database objects. As soon as I removed DATE field
> from list of primary 
> keys - everything has been working oki.
> 
> What should I do to set Torque to work properly -
> maybe I did something 
> wrong?
> 
> Greetings
> Jakub Piechnik
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail:
> torque-user-help@db.apache.org
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Mime
View raw message