Created
November 19, 2010 21:36
-
-
Save destroytoday/707232 to your computer and use it in GitHub Desktop.
Returns unique timestamps rounded down to the date (SQLite)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT DISTINCT (round(timestamp / 86400000.0 - 0.5) * 86400000.0) as time FROM timeline ORDER BY timestamp ASC | |
--in AIR, set itemClass to Date | |
--the returned dates are offset with the computer's timezone, so you need to reverse it: date.time += date.timezoneOffset * 60000; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment