View Full Version : Help with date format in SQL Query


rkrause
03-04-2011, 04:54 AM
I am trying to convert a date field in sql to a DD:MM format
example
right now its 01-16-2007 and i want to convert it to 01-16 and forget the year at the end

any help?

again this is for SQL Query im working on in SSMS 2005

pbaldy
03-04-2011, 07:49 AM
You can look in BOL at the CONVERT function and see if any of the styles does what you want. I suspect not, so you'll probably end up using the DATEPART function to concatenate the month and day together.