Problem with Date in Where statement

JapanFreak

Registered User.
Local time
Today, 01:19
Joined
Aug 25, 2007
Messages
45
Dear All,

I have a problem with filtering out certain dates in a Where-statement. The following query works:

Code:
SELECT sum(D.EVnow)/sum(D.Tot_Asset - D.Cash) AS AssetMultiple
FROM Data AS D
WHERE D.Op/(D.Tot_Asset - D.Cash)>0.1
   AND dDate=#04/30/2008#
   AND FINOTH="NONFIN";

However, if I want to have the same request for a certain period of time Access just tells me that there is a syntax error. The code below does not work:

Code:
SELECT sum(D.EVnow)/sum(D.Tot_Asset - D.Cash) AS AssetMultiple
FROM Data AS D
WHERE D.Op/(D.Tot_Asset - D.Cash)>0.1
   AND dDate>#04/15/2008#
   AND dDate<=#04/31/2008#
   AND FINOTH="NONFIN";

Can anybody tell me what the problem is??? I'm happy about every hint...

Best regards,

Tobias
 
Sorry, that was a stupid question... April 31st doesn't exist. So I simply have to use < 1st day of the following month as the second condition and it works.

Sorry.
 

Users who are viewing this thread

Back
Top Bottom