
January 7th, 2004, 09:05 AM
|
|
Registered User
|
|
Join Date: Jan 2004
Location: Australia
Posts: 1
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
Date Request Query
I need some help with this please.
Here is my script
StrSQL = "Select RateSeasonID from RateSeason WHERE StartDateTime >= #1990-01-01 12:00:00# And EndDateTime=" & Request("EndDateTime")
I send the EndDateTime to the page from a form page as follows:
GetSeasonType.asp?EndDateTime=2020-01-05%2012:00:00
but I get the following error
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression 'StartDateTime >= #1990-01-01 12:00:00# And EndDateTime=2020-01-05 12:00:00'.
/ssl/public/GetSeasonType.asp, line 26
I am tried it with the # on each side of the date but it still will not work. What am I doing wrong please as it works when the dates are precoded in the asp page, just not when it is a request variable
Regards
|