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.
| Author |
Topic |
|
davidshq
Posting Yak Master
119 Posts |
Posted - 2010-05-05 : 14:47:32
|
| I'm trying to pull just the current year. I did several different variations such as below but none have worked. I know there must be a simple fix - help. :)Year(GetDate())SELECT YEAR(SELECT GETDATE())Dave. |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-05-05 : 14:50:13
|
| didnt SELECT YEAR(GETDATE()) work for you?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
davidshq
Posting Yak Master
119 Posts |
Posted - 2010-05-05 : 14:50:36
|
| yeah, it does...i don't know what i did wrong. thanks. |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-05-05 : 14:59:25
|
| ok . coolyou can also useSELECT DATEPART(yy,GETDATE())------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|