How do I retrieve a date from SQL Server in YYYY-MM-DD
format? I need this to work with SQL Server 2000 and up. Is there a simple way to perform this in SQL Server or would it be easier to convert it programmatically after I retrieve the result set?
I've read the CAST and CONVERT on Microsoft Technet, but the format I want isn't listed and changing the date format isn't an option.
Best Answer
Limiting the size of the varchar chops of the hour portion that you don't want.