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 2000 Forums
 Transact-SQL (2000)
 how to get year from getdate funtion

Author  Topic 

nans04
Starting Member

20 Posts

Posted - 2004-08-20 : 10:00:20
I need to compare _year column in a table with current date.
Pls help. Thanks

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2004-08-20 : 10:01:26
where datepart(yyyy, getdate()) = datepart(yyyy, datecol)

Go with the flow & have fun! Else fight the flow :)
Go to Top of Page

Seventhnight
Master Smack Fu Yak Hacker

2878 Posts

Posted - 2004-08-20 : 10:09:00
or

year(getdate())

Corey
Go to Top of Page

nans04
Starting Member

20 Posts

Posted - 2004-08-20 : 10:09:59
thanks spirit1
Go to Top of Page
   

- Advertisement -