Well I have a table in sql and it contains date column with dates in it and I need to find invalid dates in a leap year e.g.
invalid dates i.e. 31st Feb. or 29th Feb. in a non leap year.
A simple query will help.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use ISDATE function of sql server. Please refer:
ISDATE (Transact-SQL),
Validate DateTime String in SQL Server 2005
Sample:
ISDATEreturns 1 if the expression is a valid date, time, or datetime value; otherwise, 0.You can check your existing table data using: