October 16, 2007

Get the date portion of a datetime

SELECT CONVERT(varchar(11), myDate, 102)
You can then use REPLACE() to substitute the . with -

No comments: