• Toreador (5/8/2012)


    To those who said the answer was easy - is this because you know how SQL handles implicit conversions of this sort, or because you ran the code? I didn't think it was easy at all, because I try not to run the code before answering, and because I would never dream of trying to cast non-date values in this way!

    It's one of those cases where it's really easy - if you know the answer already ;-). I can't see that you would be able to work this out from first priciples without doing some reading. I'd say all of the people who've said it's easy know about these implicit conversions.

    As you (and quite a number of the earlier respondents) say, it's not something that you should really be using without a very good reason.