mercredi 28 janvier 2015

sqlite datetime format: which one is better?

I'm creating a sqlite database from my c# project which will be used in my android application later on.


I have a CreateDate column in my sqlite database which I will need to get records ordered by this column later in my android application. Now my question is that is it better to save the date time as TEXT with YYYY-MM-DD HH:MM:SS format or I just convert all my dates into unix timestamp and order them easily later since it's just a number?


Which one is easier to be ordered later in mobile application? or maybe my approaches are wrong so please feel free to shoot me with some best practices for this situation.


Thanks in advance.


Aucun commentaire:

Enregistrer un commentaire