Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." 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 Basics 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 24th, 2004, 02:55 PM
Authorized User
 
Join Date: Mar 2004
Location: , , .
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 Date Selection

If i want to request a querystring from a URL address that has a value of "june" and then wnat to query a database, that has a date column. But ONLY want to select the recordsets that has a june date. How would i do something like that?

 
Old August 24th, 2004, 08:14 PM
Friend of Wrox
 
Join Date: Sep 2003
Location: Mentiri, Muara, Brunei.
Posts: 363
Thanks: 0
Thanked 1 Time in 1 Post
Default

hello,

   If the querystring contains full month name, then you can search the database like


have some constants for months
dim mnthNo
select case request.querystring(...)
  case "june"
    mnthNo=6
  ...
end select

  strSQL="select * from tablename where month(datecolumn)=mnthno"


this is in MSAccess.


 
Old September 3rd, 2004, 07:01 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Bangalore, KA, India.
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Alternatively, you can directly pass 1, 2, 3, 4 that passing Jan, Feb, etc... so that you could check that against your SQL db.

Hope that helps.

_________________________
- Vijay G
Strive for Perfection




Similar Threads
Thread Thread Starter Forum Replies Last Post
Date/Time format & multiple selection with listbox frmsasp ASP.NET 1.0 and 1.1 Basics 0 October 13th, 2005 05:50 AM
Submitting a form after a calendar date selection programmher Javascript How-To 2 August 2nd, 2005 06:02 PM
insert system date. no date and time jimmy Access VBA 6 November 20th, 2003 01:11 PM
DTS Import ( Date string to Date field) gfowajuh SQL Server 2000 1 September 30th, 2003 06:28 AM
Convert String Date to Date for a SQL Query tdaustin Classic ASP Basics 4 July 7th, 2003 06:01 PM





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