I am trying to store a date from a DateField into an sqlite database, but can't figure out what format to store/retrieve it in to preserve the value. I have been trying with the sqlite datatype as 'timestamp' and using 'long' in the application. When I retrieve the date though, it goes to 1970 instead of 2010-ish. Any recommendations?
A:
If anyone else was having a problem, this approach does work. Use timestamp in the database and long in your app. My problem was I was reading in the value into an int by accident and it was wrapping around. Reading into a long will make it work.
electrichead
2010-07-13 20:37:34