Skip to content

Instantly share code, notes, and snippets.

@clintmjohnson
Created May 21, 2015 22:31
Show Gist options
  • Select an option

  • Save clintmjohnson/8478246de4f355285f75 to your computer and use it in GitHub Desktop.

Select an option

Save clintmjohnson/8478246de4f355285f75 to your computer and use it in GitHub Desktop.
Determine whether a String is a Valid Date or Not SQL SERVER
SELECT MyData ,
ISDATE(MyData) AS IsADate
FROM (VALUES('IsThisADate'),
('2012-02-14'),
('2012-01-01T00:00:00'),
('2012-12-31T23:59:59.9999999')) dt(MyData)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment