Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 DATE as text

Author  Topic 

shebert
Yak Posting Veteran

85 Posts

Posted - 2009-12-18 : 11:22:22
anyone know what the command is to display 1/1/09 and January 09?

vijayisonly
Master Smack Fu Yak Hacker

1836 Posts

Posted - 2009-12-18 : 11:27:42
[code]declare @d datetime
set @d = '1/1/09'

select datename(m,@d) + ' ' + right(convert(varchar(4),datename(yy,@d)),2)[/code]
Go to Top of Page

shebert
Yak Posting Veteran

85 Posts

Posted - 2009-12-18 : 11:46:43
thanks
Go to Top of Page

vijayisonly
Master Smack Fu Yak Hacker

1836 Posts

Posted - 2009-12-18 : 11:53:03
Np.You're welcome.
Go to Top of Page
   

- Advertisement -