• kaspencer (8/28/2012)


    As a matter of fact, SQL Server 2005 copes with this very well, provided that the data type is changed to DATETIME.

    It would seem that in SQL Server 2005 at least, DATETIME is perfectly acceptable as a datatype for ISDATE(), although as the datatype DATE does not exist in that version, it cannot be considered.

    All this makes me think that the SQL Server core developers might just have forgotten about the new data type so far as ISDATE() is concerned!

    Thus, on changing DATE to DATETIME, SQL Server 2005 return 1, 1. That's why I falied this question, having assumed that SQL 2008 onwards would be fine with DATE.

    Ken.

    Agreed! For this reason the question states that this scenario is applicable for SS 2008 and above 🙂

    ~ Lokesh Vij


    Guidelines for quicker answers on T-SQL question[/url]
    Guidelines for answers on Performance questions

    Link to my Blog Post --> www.SQLPathy.com[/url]

    Follow me @Twitter