How to format date on MS SQL Server 2008
<p>I would like to format dates based on a pattern like for example 22/01/2015 or 2016-12-15.</p>

<p>In the .NET Framework we have DateTime -> ToString() method which accepts formats as argument or even string.Format, which does the same.</p>

<p>Is there any function on MS SQL Server 2008 that formats date based on a argument pattern?</p>