A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Date range queries



 
 
Thread Tools Display Modes
  #1  
Old October 16th, 2008, 04:45 PM posted to microsoft.public.access.queries
Pat Hughes[_2_]
external usenet poster
 
Posts: 1
Default Date range queries

I'm having problems with date range queries. Can I make these queries when
the person who built the database used "Text" as the "data type" for the date
field in the table? In my querie I am using {Between "07/01/2008" And
"9/30/2008"} but the brackets are not a part of it. But I am getting
October's data also. (The data starts with July so I don't have to worry
about before July.

  #2  
Old October 16th, 2008, 05:21 PM posted to microsoft.public.access.queries
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default Date range queries

Pat

"07/01/2008" is NOT a date, it's a text string. In Access, #7/1/2008# is
interpreted as a date/time value.

Since what you have stored is text, naturally "10/..." happens before
"9/..." (one comes before nine).

Consider converting those psuedo-dates to actual date/time values, then
sorting by the date/time value.

Regards

Jeff Boyce
Microsoft Office/Access MVP

"Pat Hughes" Pat wrote in message
...
I'm having problems with date range queries. Can I make these queries
when
the person who built the database used "Text" as the "data type" for the
date
field in the table? In my querie I am using {Between "07/01/2008" And
"9/30/2008"} but the brackets are not a part of it. But I am getting
October's data also. (The data starts with July so I don't have to worry
about before July.



  #3  
Old October 16th, 2008, 06:01 PM posted to microsoft.public.access.queries
Stockwell43
external usenet poster
 
Posts: 579
Default Date range queries

Hi Pat,

Try this:

http://www.fontstuff.com/access/acctut01.htm

Excellent Site with great information

"Pat Hughes" wrote:

I'm having problems with date range queries. Can I make these queries when
the person who built the database used "Text" as the "data type" for the date
field in the table? In my querie I am using {Between "07/01/2008" And
"9/30/2008"} but the brackets are not a part of it. But I am getting
October's data also. (The data starts with July so I don't have to worry
about before July.

 




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 Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:21 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.