asp_databases thread: Found it. Re: how do I right the SQL Query to select between dates?"
I found the way to to this thanks anyway. "#" & were missing that was the
problem
DoSQL=DoSQL & DATE() should be DoSQL=DoSQL &"#"& DATE()&"#"
Warren
wswyght@t... wrote:
> I have put in my dataBase a DataType of Date/Time,
> Now on the page I want to use the following code
>
> DoSQL=DoSQL & " Data_Sheet.Date BETWEEN "
> DoSQL=DoSQL & (DATE()-RTdays)
> DoSQL=DoSQL & " AND "
> DoSQL=DoSQL & DATE()
>
> If I run this I get the error
>
> Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
>
> [Microsoft][ODBC Microsoft Access Driver]Division by zero (null)
>
> /partners/BuildSQL.inc, line 23
>
> Line 23 is
>
> objRS.Open DoSQL, objConn
>
> My SQL code works great if I take this section of the SQL out. (the date part)
>
> Question is "how do I right the SQL Query to select between dates?"
>
> IN the DataBase the date shows as 14-Mar-2000
> IN the ASP Query the date shows as 03-14-00, now do I over come this stuff.
> My book Beginning ASP Databases does not tell me about this.
>
--
Those who make peaceful revolution impossible will make violent revolution inevitable
JFK Speech at white House 13 March 62
vital Speeches 1 April 1962 Page 356
http://www.lethbridgec.ab.ca/~wswyght/index.html