• Duncan Pryde (4/13/2011)


    Henrico Bekker (4/12/2011)


    All 4 options work? one of those questions again...pick 2 out of 4 correct answers...a quessing game again.

    Try this:

    SET DATEFORMAT ydm

    GO

    SELECT CAST('2011-04-28' AS DATETIME)

    or this:

    SET LANGUAGE British

    GO

    SELECT CAST('2011-04-28' AS DATETIME)

    and do the same for the other date types, and you'll see that DATETIME and SMALLDATETIME produce an error while DATE and DATETIME2 don't.

    So no guessing required!

    Duncan

    question doesnt state that you need to SET LANGUAGE....

    anyway.

    -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    This thing is addressing problems that dont exist. Its solution-ism at its worst. We are dumbing down machines that are inherently superior. - Gilfoyle