dbTalk Databases Forums  

Specifying a range of dates

comp.database.ms-access comp.database.ms-access


Discuss Specifying a range of dates in the comp.database.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
jca1492
 
Posts: n/a

Default Specifying a range of dates - 11-05-2003 , 02:53 PM






I am trying to specify a range of dates in a query. I have tried using
Between "12/01/1938" and 05/31/1939", but I don't get any response. There
are dates in the table which should be showing in the query. I have also
tried to get a date by >= 12/01/1938 which does return valid dates.

Is there some date function that I should be using or am I just using the
wrong syntax? Any help would be most appreciated.

Thanks,

John



Reply With Quote
  #2  
Old   
Jack
 
Posts: n/a

Default Re: Specifying a range of dates - 11-05-2003 , 08:46 PM






You need a set of quotes before each date: Between "12/01/1938" and
"05/31/1939"

Jack
"jca1492" <jca1492 (AT) insightbb (DOT) com> wrote

Quote:
I am trying to specify a range of dates in a query. I have tried using
Between "12/01/1938" and 05/31/1939", but I don't get any response. There
are dates in the table which should be showing in the query. I have also
tried to get a date by >= 12/01/1938 which does return valid dates.

Is there some date function that I should be using or am I just using the
wrong syntax? Any help would be most appreciated.

Thanks,

John





Reply With Quote
  #3  
Old   
John
 
Posts: n/a

Default Re: Specifying a range of dates - 11-05-2003 , 09:07 PM



try DateDiff() or "Where (myDate < StartDate) AND (myDate < EndDate)"
in your coditions.

regards,

John
jobrien at acscience dot com


"jca1492" <jca1492 (AT) insightbb (DOT) com> wrote

Quote:
I am trying to specify a range of dates in a query. I have tried using
Between "12/01/1938" and 05/31/1939", but I don't get any response. There
are dates in the table which should be showing in the query. I have also
tried to get a date by >= 12/01/1938 which does return valid dates.

Is there some date function that I should be using or am I just using the
wrong syntax? Any help would be most appreciated.

Thanks,

John

Reply With Quote
  #4  
Old   
News
 
Posts: n/a

Default Re: Specifying a range of dates - 11-06-2003 , 10:22 PM



Dates in Access require a # delimiter.

Between #12/01/1938# and #05/31/1939#

should work.

Regards,
Mike Parks


"jca1492" <jca1492 (AT) insightbb (DOT) com> wrote

Quote:
I am trying to specify a range of dates in a query. I have tried using
Between "12/01/1938" and 05/31/1939", but I don't get any response. There
are dates in the table which should be showing in the query. I have also
tried to get a date by >= 12/01/1938 which does return valid dates.

Is there some date function that I should be using or am I just using the
wrong syntax? Any help would be most appreciated.

Thanks,

John





Reply With Quote
  #5  
Old   
jca1492
 
Posts: n/a

Default Re: Specifying a range of dates - 11-07-2003 , 10:25 AM



Thanks for your help.


"John" <jobrienct (AT) excite (DOT) com> wrote

Quote:
try DateDiff() or "Where (myDate < StartDate) AND (myDate < EndDate)"
in your coditions.

regards,

John
jobrien at acscience dot com


"jca1492" <jca1492 (AT) insightbb (DOT) com> wrote

I am trying to specify a range of dates in a query. I have tried using
Between "12/01/1938" and 05/31/1939", but I don't get any response.
There
are dates in the table which should be showing in the query. I have
also
tried to get a date by >= 12/01/1938 which does return valid dates.

Is there some date function that I should be using or am I just using
the
wrong syntax? Any help would be most appreciated.

Thanks,

John



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.