mardi 10 février 2015

Sqlite - Calculation of time period

I need to calculate the time between a 'fixed' time (usually a few days ago) and now.


Therefore I have googled me to this sql (http://ift.tt/1mOgs1D):



SELECT strftime ('% s', '1423143532') - strftime ('% s', 'now') as timediff;


It gives a weird result (122747310831610), and I have no idea why !? :-/


Should I use a different method of calculation, is that where the problem is? If yes, which one would give me the correct result? :)


Aucun commentaire:

Enregistrer un commentaire