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)
 display yyyy format

Author  Topic 

rajasekhar857
Constraint Violating Yak Guru

396 Posts

Posted - 2010-06-10 : 07:05:21
hi how to dispaly yyyy format using either convert on datefield or datediff function as i want all the table column to show 2000,2002 on date field.

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2010-06-10 : 07:15:16
select year(DateColumn)


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

rajasekhar857
Constraint Violating Yak Guru

396 Posts

Posted - 2010-06-10 : 07:22:53
ok thanks
Go to Top of Page
   

- Advertisement -