Is this existing data you are trying to get to work or did ORMLite store this date for you? Either way you are going to have to match the formats that Sqlite supports.
Internally ORMLite uses "yyyy-MM-dd HH:mm:ss.SSSSSS"
. You can specify the format using something like the following where the ...
is replaced with the format which matches your data.
@DatabaseField(format = "...")
private Timestamp dateinicio;
Sqlite officially supports the following date formats.
- YYYY-MM-DD
- YYYY-MM-DD HH:MM
- YYYY-MM-DD HH:MM:SS
- YYYY-MM-DD HH:MM:SS.SSS
- YYYY-MM-DDTHH:MM
- YYYY-MM-DDTHH:MM:SS
- YYYY-MM-DDTHH:MM:SS.SSS
- HH:MM
- HH:MM:SS
- HH:MM:SS.SSS
- now
- DDDDDDDDDD
See this answer here: ORMLite query date format issue