Hi Thomas. Here is my code.
CREATE TABLE TEST(... DATE_VIEWED DATE DEFAULT NULL, ...)
For date types conversion I use:
public static java.util.Date convertSqlToUtilDate( final java.sql.Date
in_SqlDate ){
return ( null != in_SqlDate ) ? new java.util.Date
( in_SqlDate.getTime() ) : null;
}
public static java.sql.Date convertUtilToSqlDate( final java.util.Date
in_UtilDate ){
return ( null != in_UtilDate ) ? new java.sql.Date
( in_UtilDate.getTime() ) : null;
}
Please tell me, why when I write new java.util.Date() object into the
column and then
read it these two dates are not equal? Could I just store a Long
(milliseconds)?
Thank you.
P.S. I'm new in databases and SQL.
Maxim.
--
You received this message because you are subscribed to the Google Groups "H2
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/h2-database?hl=en.