Created
April 22, 2016 09:56
-
-
Save AndiSHFR/8dea8eea620b893dfa786ec9bdbc27e2 to your computer and use it in GitHub Desktop.
IsValidSqlDateTime
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
internal static class SqlMvaLibExtensions { | |
private static readonly DateTime _minSqlDateTime = new DateTime(1753, 1, 1); | |
private static readonly DateTime _maxSqlDateTime = new DateTime(9999, 12, 31, 23, 59, 59, 997); | |
internal static bool IsValidSqlDateTime(this System.DateTime dt) { | |
return (dt >= _minSqlDateTime && dt <= _maxSqlDateTime); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment