SQL Server 2005
How to check if given date is valid smalldatetime? Before converting datetime to smalldatetime, I already know that the value is valid datetime. But while converting datetime to smalldatetime, it is raising overflow error.
So I wanted to check if the value is valid smalldatetime and if it is then convert to smalldatetime else return NULL.
Thanks in advance.