Wrox Programmer Forums
|
ASP Forms As of Oct 5, 2005, this forum is now locked. Please use "Classic ASP beginner" at http://p2p.wrox.com/forum.asp?FORUM_ID=54 or "Classic ASP Professional" http://p2p.wrox.com/forum.asp?FORUM_ID=56 instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP Forms 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 September 29th, 2003, 01:56 AM
Registered User
 
Join Date: Sep 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default DataBase


I have one database containing dates.
In my html page there are two text boxes. In one text box i should enter starting date and in another ending date. How to get records between these two dates.
By writing codes in Asp.
Please help me
I am waiting for your help.
 
Old October 1st, 2003, 03:42 PM
Authorized User
 
Join Date: Sep 2003
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You can use the BETWEEN function with dates:

sql = "SELECT * FROM table WHERE dateColumn >= #" startDate & "#
and dateColumn <= #" & endDate & "#"

But instead of text boxes (startDate, endDate) I would use drop down menus with either pre-defined dates or dates that you are pulling from the database, otherwise you might run into the problem of date formatting.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem to restore database in C#2005 database acmuralee MySQL 0 March 25th, 2008 04:42 AM
Microsoft JET Database Database Engine (0x80040E09 cannielynn0312 Classic ASP Professional 2 December 17th, 2007 02:50 AM
Copying Table From one Database To Anoter Database jayanth_nadig VB Databases Basics 1 June 19th, 2006 02:39 PM
Upload image to database or not to database? thachnn SQL Server ASP 0 October 11th, 2004 03:00 AM





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