Wrox Programmer Forums
|
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 May 28th, 2008, 06:28 PM
Friend of Wrox
 
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

Looking at this:

WHERE Date_Paid Like '%" & monthdate & "'

Would indicate Date_Paid is not a date data type. Have you made this field a string?

Wind is your friend
Matt
www.elitemarquees.com.au
 
Old May 29th, 2008, 07:48 AM
Authorized User
 
Join Date: Apr 2007
Posts: 92
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes, When you select a month and year from my pulldowns from the form page, it returns a string "date_test.asp?monthdate=04&yeardate=2007" for example.

 
Old May 29th, 2008, 06:13 PM
Friend of Wrox
 
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

If as I suspect Date_Paid is you database field name - Have another read of my question.

Its obvious the Querystring passes a string, my question refered to the data type of your database field. Hopefully you have stored this as a date type and not a string?

Wind is your friend
Matt
www.elitemarquees.com.au
 
Old May 30th, 2008, 07:51 AM
Authorized User
 
Join Date: Apr 2007
Posts: 92
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes, my date field is set as a "DATE" field not as a "VARCHAR"... after endless searching and having issues with the search function only searching the day and year, I have found to sue this to resolve the reversed MySQL YYY-MM-DD issue as well...

SQL =" SELECT * FROM unsolved WHERE date_FORMAT(Date_Entered, '%m') Like '%" & monthdate & "' and date_FORMAT(Date_Entered, '%Y') Like '" & yeardate & "%' and State Like 'Declined%' ORDER BY Date_Entered ASC ;"

works like a charm now!






Similar Threads
Thread Thread Starter Forum Replies Last Post
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
Help with Date Range PacMed Access 1 February 1st, 2005 12:30 PM
Date Range mrideout BOOK: Beginning ASP.NET 1.0 0 January 2nd, 2005 07:18 PM





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