Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 4th, 2005, 01:40 PM
Registered User
 
Join Date: Oct 2005
Location: Coventry, Ct, USA.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Date Range Calculation

Hello everyone...I am new to this forum. I have an Access 2000 question that seems to be stumping even our helpdesk here. Here is what I am trying to accomplish, I receive a report in Excel with the following two fields "Start Date" i.e. 7/1/2007 to an "End Date" 02/28/2011. I can import this table into Access then what I would like Access to do is to look at the dates and to go (using the example) from the start date (7/1/2007) to the end of the year (12/31/2007) then create a new line and start with the next year (01/01/2008) in the start field and end with (12/31/2008) and so on until it reaches EOD. I would really appreciate any help...not sure if this can actually be done...thanks for the help.

 
Old October 4th, 2005, 05:01 PM
Friend of Wrox
 
Join Date: Aug 2004
Location: Orange County, CA, USA.
Posts: 385
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Can't help you with access but if you want to do it in SQL use a while statement to loop, adding a single row of data, then use a dateadd function to add a date, and loop until the date your working on is hit (12/31/2008.

 
Old October 5th, 2005, 08:22 AM
Registered User
 
Join Date: Oct 2005
Location: Coventry, Ct, USA.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks...I will give that a try and see how I make out.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Generic Date Calculation arnabghosh Javascript 0 April 10th, 2008 01:56 AM
How to find a date range between another date rang tayvonne Access 2 August 3rd, 2006 09:50 AM
Date Range Flipflop SQL Language 6 November 25th, 2005 08:36 AM
Need Help With Date Range rpainter Crystal Reports 0 June 20th, 2005 01:01 PM
Query based on date calculation? skinny Access 5 September 30th, 2003 03:20 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.