Last active
April 16, 2021 12:59
-
-
Save exaucae/80c45ba2d9dbbc6a3d84d813fa6f0d2d to your computer and use it in GitHub Desktop.
sql-server-convert
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
-- From datetime to string | |
-- The third argument of the convert function specifies the datetime format | |
DECLARE @date DATETIME = '2020-10-21 17:38:54.840' | |
BEGIN | |
SELECT CONVERT(varchar, @date, 115) | |
END |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment