Last active
January 17, 2020 11:47
-
-
Save vgashic/8b9c155fe390f3ba334c76b104528a93 to your computer and use it in GitHub Desktop.
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
-- SQL Server 2012+ | |
-- Codes for CONVERT function | |
SELECT n.n | |
,TRY_CONVERT(VARCHAR(100), GETDATE(), n) AS date_format | |
FROM ( | |
SELECT TOP 200 ROW_NUMBER() OVER (ORDER BY name) AS n | |
FROM sys.objects) AS n | |
WHERE TRY_CONVERT(VARCHAR(100), GETDATE(), n) IS NOT NULL |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment