Skip to content

Instantly share code, notes, and snippets.

@destroytoday
Created November 19, 2010 21:36
Show Gist options
  • Save destroytoday/707232 to your computer and use it in GitHub Desktop.
Save destroytoday/707232 to your computer and use it in GitHub Desktop.
Returns unique timestamps rounded down to the date (SQLite)
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