• shwetakakran01 - Wednesday, February 7, 2018 4:58 AM

    your date format is not correct. it should be month/date/year. your are trying to do with date/month/year which is not correct according to format.

    Who's format? day-month-year is actually a very common format in Europe. The problem isn't the format per se. As Gail pointed out, the problem is the format in conjunction with the regional settings... That or use the universal YYYY-MM-DD HH:mm:SS or YYYYMMDD formats.

    If the OP is stuck having to deal with the DD-MM-YYYY... format, the CONVERT or TRY_CONVERT functions can be an easy fix...

    SELECT CONVERT(DATETIME, '24-03-2016 00:00:00', 103);
    -- or 
    SELECT ISDATE(CONVERT(DATETIME, '24-03-2016 00:00:00', 103));