Skip to content

Instantly share code, notes, and snippets.

@cpoDesign
Created April 30, 2017 22:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cpoDesign/db70e413fbbba37d9bf4e8df714c72e4 to your computer and use it in GitHub Desktop.
Save cpoDesign/db70e413fbbba37d9bf4e8df714c72e4 to your computer and use it in GitHub Desktop.
SQL - Select distinct dates
SELECT
DISTINCT
CAST(FLOOR(CAST(Created as FLOAT)) as DateTime) as date
FROM
dbo.table
ORDER BY 1 ASC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment