> i have a date stored in my db in this format: 2005-03-15 00:00:00.000
Stored in what db, SQL Server? This is not how it's stored. Internally,
it's stored as two integer values (one for the date, and one for the time).
What you are seeing is some client tool's representation format (Enterprise
Manager, perhaps?).
To get it out the way you like, you can handle the formatting on the client
as Ray suggests, or you can handle it in the database as follows:
SELECT RIGHT('0'+RTRIM(MONTH(someColumn)), 2)
+ '/' + RIGHT('0'+RTRIM(YEAR(someColumn)), 2)
FROM someTable
|