Harsha M V
Harsha M V

Reputation: 54949

android Sqlite datatime datatype

Which is the best datatype to be used for creating a datetime field like in MysQL ?

i wanna store in this format YYYYMMDD HHMMSS

Upvotes: 0

Views: 1661

Answers (1)

Vladimir Ivanov
Vladimir Ivanov

Reputation: 43098

there is no DATE format in SQLite3, so you should store your date time in string. Format should just reflect your need. If you don't want to store time, DDMMYYYY will be enough.

Just format the date before saving and parse the string when reading from db.

Upvotes: 1

Related Questions