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...
ASKED: Nov 11, 2008  9:18 PM GMT
UPDATED: November 11, 2008  9:37:55 PM GMT
60,245 pts.

Answer Wiki:
You could use the CONVERT function.

CONVERT ( data_type [ ( length ) ] , expression [ , style ] )

For example:

select convert(varchar,DateColumn,101) from table_x


Have a look at the CAST and CONVERT MSDN Page to see the available styles table, and to get more help.
Last Wiki Answer Submitted:  Nov 11, 2008  9:37 PM (GMT)  by  Carlosdl   60,245 pts.
To see other answers submitted to the Answer Wiki View Answer History.
Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _