RE: Using partial dates in a query expression



Open your query in design view and scroll the grid to the right to a blank
column.
Click in the Field row and pull dow you date field name.
Edit that block in the grid to look like this --
Month_Day: Format([YourDateFieldName], "m/d")

In the Criteria row enter this --
[Enter Month/Day (1/14)]

--
KARL DEWEY
Build a little - Test a little


"LaurenM" wrote:

Hi all,

I am trying to create an expression that will give me a numerical value
based on specific date criteria. I need to use only the month and day
information within a date. Since the year will always change, I can't include
it in my expression. For example, I want to write something like, If the
month and day is from 1/1 - 4/15, the result is 1. Do I need to convert the
date information to what the numerical equivalent would be in order to do
something like this? I am not all that confident with writing code but I
would appreciate any helpful advice with this.

Thank you in advance!
LaurenM
.



Relevant Pages

  • Re: Table transform
    ... How can I write the subquery so it joins on code from the main query? ... down to a Field row in grid. ... In Criteria row for this column, ...
    (microsoft.public.access.queries)
  • Re: selecting newer values
    ... have multiple people answering questions is a good one. ... > Older table down in to field row ... > Drag and Drop Number field from ... > of second column of grid. ...
    (microsoft.public.access.queries)
  • Re: Updating Two Related Fields in One Query
    ... > I thank you very much for your reply & with your query I am getting result. ... >> Drag and Drop Quantity field from ... >> S table down in to field row ... >> of second column of grid. ...
    (microsoft.public.access.queries)
  • Re: selecting newer values
    ... have multiple people answering questions is a good one. ... > Older table down in to field row ... >> Drag and Drop Number field from ... > of second column of grid. ...
    (microsoft.public.access.queries)
  • Re: Count?
    ... In the next column of the Field row, ... Drag StoreNo into the grid. ... > In the Total row under this field, ...
    (microsoft.public.access.queries)