Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Converting date format question

Status
Not open for further replies.

safarijoe2000

Programmer
Jul 25, 2002
38
0
0
GB
Hello,

I have a field (field1) in the format dd/mm/ccyy. I need to somehow convert this field into a month/ccyy format.

For example: 01/08/2003 should be August 2003, 01/02/2002 should be February 2002.

Any help will be greatly appreciate it.

Thanks
 
Code:
SELECT DATENAME(m, field1) + ' ' + CAST(YEAR(field1) AS varchar(4)) AS theDate
FROM table1

--James
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top