I need to read the sqlite database provided to me, so I cannot change the date format (yyyy-MM-dd) in the tables. When I try to use ormlite to create an object for me using the following annotation:
@DatabaseField(columnName = "REVISION_DATE", dataType = DataType.DATE_STRING) public Date revisionDate;
it raises the following error:
java.sql.SQLException: Problems with column 3 parsing date-string '2012-05-01' using 'yyyy-MM-dd HH:mm:ss.SSSSSS'
Is there a place where I can specify ormlite I want to use "yyyy-MM-dd" as a date string?
Yenchi
source share