>
>I know you don't like to chaise links. But if you just look into this thread on stackoverflow, it uses the separators:
>
https://stackoverflow.com/questions/22477356/convert-datetime-to-string-yyyy-mm-ddThat is what I was thinking too, until a developer on a forum was asking a question claiming it was failing. I didn't believe him and he was right. The culprit was language setting (TURKISH namely). Without separators it worked and works under any MS SQL Server version\edition + date settings + language settings. It might be a single MS SQL Server version + TURKISH language setting that is affected only, so it is really a choice for you. To my experience, it always works without separators.