Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - ASP Dynamic Date Ranges
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

ASP Dynamic Date Ranges

 Post Reply Post Reply
Author
velkymx View Drop Down
Groupie
Groupie


Joined: 24 February 2003
Location: United States
Status: Offline
Points: 44
Post Options Post Options   Thanks (0) Thanks(0)   Quote velkymx Quote  Post ReplyReply Direct Link To This Post Topic: ASP Dynamic Date Ranges
    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")
Back to Top
Phat View Drop Down
Senior Member
Senior Member


Joined: 23 February 2003
Status: Offline
Points: 386
Post Options Post Options   Thanks (0) Thanks(0)   Quote Phat Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
velkymx View Drop Down
Groupie
Groupie


Joined: 24 February 2003
Location: United States
Status: Offline
Points: 44
Post Options Post Options   Thanks (0) Thanks(0)   Quote velkymx Quote  Post ReplyReply Direct Link To This Post Posted: 16 December 2004 at 12:56pm
Nope - that didnt work. It said not enough info.
Back to Top
dj air View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 April 2002
Location: United Kingdom
Status: Offline
Points: 3627
Post Options Post Options   Thanks (0) Thanks(0)   Quote dj air Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Gullanian View Drop Down
Senior Member
Senior Member
Avatar

Joined: 04 January 2002
Location: England
Status: Offline
Points: 4373
Post Options Post Options   Thanks (0) Thanks(0)   Quote Gullanian Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.