Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases 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 August 17th, 2004, 08:45 PM
Authorized User
 
Join Date: Mar 2004
Posts: 84
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to gmoney060 Send a message via MSN to gmoney060
Default Selecting recordsets within a week of NOW

How do I select everything from a database were the date is within 1 week of today.... All I would need is the selection statement. O, and the dates in the database are like this "06/07/2004" so I am not sure if you can use the function "now()"... Any help would be great!

 
Old August 17th, 2004, 10:55 PM
Friend of Wrox
 
Join Date: May 2004
Posts: 642
Thanks: 0
Thanked 43 Times in 42 Posts
Default

you can use the following statement:

select * from table_name where your_date between getDate() and getDate() + 7

Hope this helps

Om Prakash
 
Old August 18th, 2004, 07:36 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Hey,

What database are you using? If you do it directly in ASP, you can use date, and might be able to do date - 7. If you are doing it in SQL statement, something like above if you are using SQL Server.

Brian





Similar Threads
Thread Thread Starter Forum Replies Last Post
DAY of the week wdepreter Excel VBA 3 February 7th, 2007 06:44 AM
Week Numbers ppenn Access VBA 2 January 4th, 2007 09:20 AM
Help getting This Week from query. jefferis Beginning PHP 6 January 10th, 2006 09:18 AM
get the week from the given date Beulah ASP.NET 1.0 and 1.1 Basics 1 September 25th, 2003 11:49 AM





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