Created
January 2, 2018 16:19
-
-
Save codenamejason/d0f16c0a1e3c265dca0aed7c73356ba0 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
create function dbo.string2Date(@myDate nchar(50)) | |
returns datetime | |
as | |
begin | |
if isDate(@myDate) = 1 | |
return cast(@myDate as datetime) | |
return null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment