Hi Richard. In this section, we mention that to get all of the dates between two values, we could say >=[Start Date] and <[End Date], meaning ">=" is "after" and "<" is "before". But in the previous section, when we look at all people who worked here around 1 month, why do we say Date()-30, since ">" is after (and "<" is before), and we're looking for people who joined "after" 30 days ago (i.e. closer to now than 30 days ago)? Thank you for clarifying. -Joe
Reply from Rick Rost:
Joe, since date values also include a TIME component, and we want to search between two dates, if I say
>=#1/1/2000# AND <#1/1/2001#
This will include all of the TIME values in 1/1/2000 but will NOT include, for example 1pm on 1/1/2001. You want to STOP at midnight on that date. This is why one value includes >= and the other is just <.
So, greater than 30 days ago would be
>Date()-30
This would not include exactly midnight on that date, however. I guess it all depends on whether or not you're dealing with TIME values, or just dates only.
Sorry, only students may add comments.
Click here for more
information on how you can set up an account.
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.
This thread is now CLOSED. If you wish to comment, start a NEW discussion in
Access Beginner 5.