0

I am new to android and creating an application with sqlite database.

I am using SQLite browser to create database in android. I just want to create a time stamp filed just like mysql. But in SQLite browser there is no such field like timestamp.

My little question is is it possible to add the timestamp field in sqlite and query order by the timestamp field

1 Answer 1

1

There is no any date format in sqlite only TEXT please read this link You should hold your Date as text in ISO8601 ("YYYY-MM-DD HH:MM:SS.SSS") format

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks for your reply. So if I just wanna sort the query according to date time how we can do this ?
Sorting TEXT type column with your data in ISO8601 format should work well because it got Lexicographical order

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.