Posted by Tony Rogerson on 11/13/06 07:47
declare @number int
set @number = 200611
select left( datename( month, converted_to_date ), 3 ) + ' ' + datename(
year, converted_to_date )
from ( select cast( cast( @number as char(6) ) + '01' as datetime ) as
converted_to_date ) as q
Tony.
--
Tony Rogerson
SQL Server MVP
http://sqlblogcasts.com/blogs/tonyrogerson - technical commentary from a SQL
Server Consultant
http://sqlserverfaq.com - free video tutorials
"klabu" <noone_at_gmail_dot_com> wrote in message
news:12lfgcha53al985@corp.supernews.com...
> Hi
>
> how to conert (number) 200611 to string 'Nov 2006' ?
>
> thanks
>
[Back to original message]
|