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)
 Problem with dates

Author  Topic 

cipriani1984
Constraint Violating Yak Guru

304 Posts

Posted - 2009-03-23 : 06:17:19
Hi,

Is there a way in SQL where if i have this date: 07/04/2008, is there a way in sql to get which week of the year this day is on?

ra.shinde
Posting Yak Master

103 Posts

Posted - 2009-03-23 : 06:20:29
select datepart(week,getdate())

Rahul Shinde
Go to Top of Page

cipriani1984
Constraint Violating Yak Guru

304 Posts

Posted - 2009-03-23 : 06:33:38
Thanks for that, sorry for asking silly question i know i should read sql libraries more but just needed a prompt reply. Thank you

quote:
Originally posted by ra.shinde

select datepart(week,getdate())

Rahul Shinde

Go to Top of Page
   

- Advertisement -