Click here to Skip to main content
15,886,074 members

Comments by Jeff Moden (Top 2 by date)

Jeff Moden 29-Jun-21 10:09am View    
Instead of just looking at the code and coming to the wrong conclusion because you don't actually understand the code, run the code and see that it solves the OPs problem. ;)
Jeff Moden 8-Jun-20 14:47pm View    
Yes... ISO 8601 allows for dashes as delimiters. And, no... the dashes do not need to be included in the YYYYMM format although I certainly think they make things much more readable and DO, in fact, identify that it's formatted correctly.

But... ISO 8601 says that dashes are an alternate format from the YYYYMMDD format, which is the primary format. "alternate" formats are frequently bastardized and, in SQL Server, if the language is French, the format using dashes is YYYY-DD-MM.

The real key here is that my suggestion of using YYYYMMDD is actually secondary and the OP must have folks settle on a standard that is completely unambiguous. Unfortunately, in SQL Server, YYYY-xx-xx is NOT completely unambiguous.