Print Page | Close Window

ASP Dynamic Date Ranges

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=13000
Printed Date: 30 March 2026 at 7:50pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: ASP Dynamic Date Ranges
Posted By: velkymx
Subject: ASP Dynamic Date Ranges
Date Posted: 15 December 2004 at 7:23pm
Can anyone tell me what I am doing wrong:

SELECT tbl_operations.OID, tbl_operations.Operation_Date, tbl_operations.PID, ID
FROM tbl_operations_complications,tbl_operations
WHERE tbl_operations_complications.Operation_Date
BETWEEN tbl_operations.Operation_Date
AND DateAdd("m",1,"tbl_operations.Operation_Date")



Replies:
Posted By: Phat
Date Posted: 15 December 2004 at 10:36pm
SELECT tbl_operations.OID, tbl_operations.Operation_Date, tbl_operations.PID, ID
FROM tbl_operations_complications,tbl_operations
WHERE tbl_operations_complications.Operation_Date
BETWEEN tbl_operations.Operation_Date
AND DateAdd("m",1,"tbl_operations.Operation_Date")

remove the " around "tbl_operations.Operation_Date" having these make it think it is a string rather the table value.


Posted By: velkymx
Date Posted: 16 December 2004 at 12:56pm
Nope - that didnt work. It said not enough info.


Posted By: dj air
Date Posted: 16 December 2004 at 2:43pm
have you tried CDate ing the table value for the second /last table name , also try +1 not just 1


Posted By: Gullanian
Date Posted: 18 December 2004 at 5:57am
What error is it showing, or is it not providing the correct results?  The 'between' statement never seemed to work for me, try using less than "<" or greater than ">" statements instead.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net