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 2008 Forums
 Transact-SQL (2008)
 Convert to date

Author  Topic 

amitranjan
Starting Member

45 Posts

Posted - 2011-03-17 : 10:24:41
Hi,
I need to compare current day with some value. Like from front end i am passing 5, then in sql i want to match if the current day of the month is 5.

amit Ranjan

jimf
Master Smack Fu Yak Hacker

2875 Posts

Posted - 2011-03-17 : 10:26:56
select datepart(day,getdate())

Jim

Everyday I learn something that somebody else already knew
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2011-03-18 : 03:35:25
select day(getdate())

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -