5 pts.
 Date formats in SQL Server Stored Procedures
This one will be easy, I'm sure. I'm a novice at Stored Procedures, and I'm wondering what function I can use to display a smalldatetime field (currently displaying as Dec 19, 2008 12:00AM) as a short date (12/19/2008)? I am on Sql Server...

Software/Hardware used:
ASKED: November 11, 2008  9:18 PM
UPDATED: November 11, 2008  9:37 PM

Answer Wiki:
You could use the CONVERT function. CONVERT ( data_type [ ( length ) ] , expression [ , style ] ) For example: <pre>select convert(varchar,DateColumn,101) from table_x</pre> Have a look at the <a href="http://msdn.microsoft.com/en-us/library/ms187928.aspx">CAST and CONVERT MSDN Page</a> to see the available styles table, and to get more help.
Last Wiki Answer Submitted:  November 11, 2008  9:37 pm  by  carlosdl   63,535 pts.
All Answer Wiki Contributors:  carlosdl   63,535 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _