Skip to content

Instantly share code, notes, and snippets.

@ArCiGo
Created May 19, 2019 22:08
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 ArCiGo/b0bfb752b9db74dd64c936d929a453c6 to your computer and use it in GitHub Desktop.
Save ArCiGo/b0bfb752b9db74dd64c936d929a453c6 to your computer and use it in GitHub Desktop.
SELECT DATENAME(weekday, GETDATE());
GO
/** Output **/
------------------------------
Sunday
SELECT DATEDIFF(dd, '20170426', '20170725');
GO
/** Output **/
-----------
90
SELECT DATEFROMPARTS(2017, 04, 26);
GO
/** Output **/
----------
2017-04-26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment