In Oracle, you can use:
SELECT to_char(sysdate, \'yyyy-mm\') FROM dual;
to show just the year and month portion of a date. Additionally, you ca
Currently the best option is to have a CLR function that is a wrapper to .NET's DateTime.ToString(string format).
If you don't want a separate function, you can build the required string from pieces:
YEAR(@d) + '-' + MONTH(@d) + '-' + DAY(@d)
As for the definite solution, there will be a formatting function in the next version of SQL Server.