• Jeff Moden - Wednesday, March 7, 2018 2:12 PM

    jcelko212 32090 - Monday, March 5, 2018 6:34 PM

    You also don’t know that there’s only one standard display format allowed in ANSI/ISO standard SQL. So first thing let’s go ahead and correct what you did post:

    Apparently, you've never actually read the standards, which allow for two formats. YYYYMMDD as the primary/preferred format and YYYY-MM-DD as a secondary format, which silently screws you in SQL Server depending on the default language.  For example, if the French language is the default, SQL Server will actually use or consume what you think is YYYY-MM-DD as YYYY-DD-MM and will only report an error if you violate the allowed range for any of the parts.

    No, Jeff, ISO-8601 has several display formats, but we voted to allow only the "yyyy-mm-dd" in ANSI/ISO Standard SQL. I would have like the version with a "T" between the date and time instead of a space. A solid string prevents "white space" problems.

    Please post DDL and follow ANSI/ISO standards when asking for help.