PC Review


Reply
Thread Tools Rate Thread

Criteria help

 
 
Matthew Dyer
Guest
Posts: n/a
 
      18th Nov 2010
I am trying to set my criteria to pull a specific date for my range of
data. =#11/1/2010# would work but the data is stored in long date
format (date, time, etc.). What would I use for my criteria to pull
anything from 11/1/10?
 
Reply With Quote
 
 
 
 
John Spencer
Guest
Posts: n/a
 
      18th Nov 2010


>=#11/1/2010# AND <#11/2/2010#


Or slower but it will work. Use a calculated field to return just the date
portion.
Field: DateValue(TheField)
Criteria: = #11/1/2010#

John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County

On 11/18/2010 1:08 PM, Matthew Dyer wrote:
> I am trying to set my criteria to pull a specific date for my range of
> data. =#11/1/2010# would work but the data is stored in long date
> format (date, time, etc.). What would I use for my criteria to pull
> anything from 11/1/10?

 
Reply With Quote
 
Bob Barrows
Guest
Posts: n/a
 
      18th Nov 2010
Matthew Dyer wrote:
> I am trying to set my criteria to pull a specific date for my range of
> data. =#11/1/2010# would work but the data is stored in long date
> format (date, time, etc.). What would I use for my criteria to pull
> anything from 11/1/10?


Just to expand on John's answer:
Actually, your dates are not stored with any format: they are
_displayed_ with a format that you specify. Dates are stored as Numbers
with subtype Double. The whole number portion contains the number of
days since the seed date, and the decimal portion represents the time of
day: .0 = midnight, .5 = noon

So your point would have been more easily understood if you had said
that you stored both date and time in the field, rather than date-only
or time-only .

--
HTH,
Bob Barrows


 
Reply With Quote
 
Matthew Dyer
Guest
Posts: n/a
 
      18th Nov 2010
On Nov 18, 11:41*am, John Spencer <JSPEN...@Hilltop.umbc> wrote:
> *>=#11/1/2010# AND <#11/2/2010#
>
> Or slower but it will work. Use a calculated field to return just the date
> portion.
> Field: DateValue(TheField)
> Criteria: = #11/1/2010#
>
> John Spencer
> Access MVP 2002-2005, 2007-2010
> The Hilltop Institute
> University of Maryland Baltimore County
>
> On 11/18/2010 1:08 PM, Matthew Dyer wrote:
>
>
>
> > I am trying to set my criteria to pull a specific date for my range of
> > data. =#11/1/2010# would work but the data is stored in long date
> > format (date, time, etc.). What would I use for my criteria to pull
> > anything from 11/1/10?- Hide quoted text -

>
> - Show quoted text -


Thanks John. I never thought to use the AND to set a less than value.
This makes lots of sense and my new query is running now. I'll let you
know how it goes. I also like the re-formatting of the field into
datevalue. i'm a beginner to access and database work in genereal.
Thanks for the help.
 
Reply With Quote
 
Matthew Dyer
Guest
Posts: n/a
 
      18th Nov 2010
*Udate* Query ran perfectly with the And function added.

Bob, sorry about the confusion. I am new to the database thing. I've
got a very good handle on Excel and should have made the connection
that the data is stored as a number (double) and then displayed with
the type of formatting requested.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to stop Access re-arranging query criteria onto multiple criteria lines for OR condition Chrisso Microsoft Access 3 9th Nov 2007 11:50 AM
Query with criteria for long data type but criteria is double =?Utf-8?B?THluZGE=?= Microsoft Access Queries 1 30th Jan 2007 01:24 AM
Selection.AutoFilter Field / Criteria => criteria sometimes non-existing on worksheet markx Microsoft Excel Programming 1 24th Nov 2006 02:52 PM
Counting Cells with multiple criteria.One criteria supporting wild =?Utf-8?B?QXpoYXIgQXJhaW4=?= Microsoft Excel Worksheet Functions 1 12th Jan 2005 08:33 AM
Re: have input box. Need criteria entered to refer to cond. format criteria Bob Phillips Microsoft Excel Programming 0 1st Mar 2004 08:17 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:38 AM.