Where are you getting that it sets the date to 0? The error log you posted shows you are trying to access an empty cursor. At the very least you should be checking to see if the cursor is empty or not before you try to read from it.
I'd suggest you download an SQLite database browser (like
this one), then you can check that the data is being saved in the format you think it is, plus you can run queries on it to verify that your syntax is correct.
- Colin.