I'm trying to utilize dates within an sqlite database. I'm storing my dates as timestamps, however when I personally use strftime() to format these to human readable dates I get back unxpected results.
Condider the next, I choose the present timestamp:
SELECT strftime("%s","now"); 1281353727
I Quickly attempt to format to start dating ? while using timestamp which i know to represent now looking to return an individual readable format of the modern date:
SELECT strftime('%d - %m - %Y ', 1281353727); 01 - 04 - 3503
Rather I recieve the above mentioned result. Is correct behavior? shall we be held doing a problem?
Thanks ahead of time,
You have to convert the timestamp to datetime first:
SELECT strftime('%d - %m - %Y ', datetime(1281353727, 'unixepoch')) FROM Visits;