• On my SQL 2008 server (using the Master database so no question of compatibility level) this fails with the previously mentioneed "GetBytes function" error.

    use master

    DECLARE @Date AS DATE=GETDATE()

    SELECT @Date as '@Date'

    An error occurred while executing batch. Error message is: Invalid attempt to GetBytes on column '@Date'. The GetBytes function can only be used on columns of type Text, NText, or Image.

    If you explicitly cast the DATE to CHAR or VARCHAR then it works (also if you change the type of date to DATETIME). I'm not sure why this is so, as the conversion page says that there is an implicit conversion from Date to char and varchar AND no conversion possible to Text, NText or Image.

    So, I got the right answer for the wrong reason, but it was graded wrong for an unknown reason. Sounds fair to me.