Forums

ASP

This topic is locked

Search with date range

Posted 14 Jul 2003 12:26:35
1
has voted
14 Jul 2003 12:26:35 Foram Sheth posted:
Need help on searching access database with a date range i.e. search where date BETWEEN startdt and enddt !! Please help

Replies

Replied 14 Jul 2003 14:53:59
14 Jul 2003 14:53:59 Vince Baker replied:
MS Access has a strange syntax for this...


Select *
from yourtablename
where yourdatefield between #11/01/2003# and #12/01/2003#



Regards
Vince

Visit my home: www.chez-vince.com

VBScript | ASP | HTML | SQL | Oracle | Hosting
Replied 15 Jul 2003 14:51:24
15 Jul 2003 14:51:24 Foram Sheth replied:
Thanx Vince !! I did figure that out .. but what out listing the variables in Ultradev and what will be the default values ?

MS Access has a strange syntax for this...


Select *
from yourtablename
where yourdatefield between #11/01/2003# and #12/01/2003#



Regards
Vince

Visit my home: www.chez-vince.com

VBScript | ASP | HTML | SQL | Oracle | Hosting


Replied 15 Jul 2003 15:53:13
15 Jul 2003 15:53:13 Vince Baker replied:
Try

Select *
from yourtablename
where yourdatefield between #varFromDate# and #varToDate#

Then define your two variables varFromDate and varToDate as normal.



Regards
Vince

Visit my home: www.chez-vince.com

VBScript | ASP | HTML | SQL | Oracle | Hosting





Regards
Vince

Visit my home: www.chez-vince.com

VBScript | ASP | HTML | SQL | Oracle | Hosting

Reply to this topic