<p>I need to convert a value which is in a <code>DateTime</code> variable into a <code>varchar</code> variable formatted as <code>yyyy-mm-dd</code> format (without time part).</p>
<p>How do I do that?</p>

Try the following:
```
```
CONVERT(varchar(10), [MyDateTimecolumn], 20)
```
```
For a full date time and not just date do:
```
```
CONVERT(varchar(23), [MyDateTimecolumn], 121)
```
```
See this page for convert styles:
http://msdn.microsoft.com/en-us/library/ms187928.aspx
OR
SQL Server CONVERT() Function