Created
January 26, 2022 17:41
-
-
Save James-McNeill/4962ab4854e82d0861f469777f2e41bd 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
DECLARE @date1 NVARCHAR(20) = '10.01.2022'; | |
-- Set the date format and check if the variable is a date | |
SET DATEFORMAT mdy; | |
--PRINT @date1; | |
SELECT ISDATE(@date1) AS result | |
, @date1 AS review_date; | |
GO | |
-- By using the GO keyword we have segmented the code and now the interpreter does not know | |
-- what the local variable @date1 is | |
SELECT ISDATE(@date1) AS result | |
, @date1 AS review_date; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment