Massoud Malang
Massoud Malang

Reputation: 33

Storing Date and Time in SQLite Android

I am creating an android application and I need to store date and time values from the user to my sqlite database. I am using date and time picker tools available in eclipse. Can anyone please tell me how to store these values in sqlite database(which format)..?? Any help is be greatly appreciated...

Upvotes: 2

Views: 3496

Answers (1)

Michał Klimczak
Michał Klimczak

Reputation: 13154

You don't have "real" data types in SQLite. There are only 5 of them and they serve as a hint, not a restriction. So you can put anything there, e.g. String in an Integer field.

Read more Here: http://www.sqlite.org/datatype3.html especially this "1.2 Date and Time Datatype", it addresses your specific concern.

Upvotes: 2

Related Questions