Drop Table
Support Forum for database administrators and web based access to important newsgroups related to databasesHi, I need to find the number of Mondays within a given date range. Example: How many Mondays between 01/01/2006 and 06/30/2006. Any suggestions on how to do this? Jim
Post Follow-up to this messagedeclare @date1 datetime set @date1 = '20061001' declare @date2 datetime set @date2 = '20061029' declare @anyMonday datetime set @anyMonday = '19000102' select datediff(day,@anyMon day,@date2)/7 - datediff(day,@anyMon day,@date1)/7 as MondayBetween <Jim.Mueksch@wellsfargo.com> wrote in message news:1161982195.940615.282480@k70g2000cwa.googlegroups.com... > Hi, > > > I need to find the number of Mondays within a given date range. > > Example: How many Mondays between 01/01/2006 and 06/30/2006. > > Any suggestions on how to do this? > > > Jim >
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread