• Steve Jones - Editor (2/17/2009)


    OK, my head hurts.

    I've awarded back points since there is obviously some issue here. I missed the correct answer with 1/30, so I've fixed that.

    As far as the other items, I've changed the colon to a period for the ms, but I get a conversion error when adding the "T" in the date format. I've also changed the answers to show one correct answer.

    apologies for the delays.

    Hi Steve,

    No need to apologize. You do a great job, day in day out, with keeping the site interersting. Errors will slip through - if only to prove that you are still human. (You are, are you?)

    I'm intrigued by the error you got when you included the T. Can you post the EXACT value you used when you got that error? (Looking back at the question and answer, I remember that it already had two formats in use - one for loading the sample data, with dashes in between the date components; and one in the query, without the dashes. A well-formed datetime constant with time component needs both: dashes between the date components, AND an uppercase T between date and time. (Plus of course the colons between the time components and the dot before the milliseconds).


    Hugo Kornelis, SQL Server/Data Platform MVP (2006-2016)
    Visit my SQL Server blog: https://sqlserverfast.com/blog/
    SQL Server Execution Plan Reference: https://sqlserverfast.com/epr/