Recently, while trying to mash Team Foundation Server and SQL Server Reporting Services, I needed to convert a DateTime in SQL to a short date string. This is how I did it.
CONVERT(VARCHAR, ClosedDate, 101)
That's it. The definition for doing so is as follows:
CONVERT ( data_type [ ( length ) ] , expression [ , style ] )
MSDN has quite an article describing CONVERT in depth.
Home
© Rapidparts, Inc 2008 | 2950 Walkent Ct. NW, Grand Rapids, MI 49544 | Phone 616.647.2500 | info@rpionline.com