Skip to content

Instantly share code, notes, and snippets.

@markjames
Created February 20, 2012 11:19
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 markjames/1868830 to your computer and use it in GitHub Desktop.
Save markjames/1868830 to your computer and use it in GitHub Desktop.
Date Diff
SELECT
DATEDIFF(@oldDate,a.DisplayDate) AS 'Date Difference',
(@oldDate:=a.DisplayDate) as 'DisplayDate'
FROM
NewsPost a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment