Date function

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • EV

    Date function

    We have a personnel database that we want to set up...For time off we
    will have a start date field and an end date field as well as a field
    for the number of hours. We need to determine how many people (via
    query) will be off for any given day (date) - for example:

    Roy is off 8/9/04 (start date field) - 8/12/04 (end date field)
    Bob is off 8/7/04 (start date field) - 8/10/04 (end date field)
    Steve is off 8/4/04 (start date field) - 8/9/04 (end date field)

    We need to know how many people will be off on 8/9/04 - so we need to
    "calculate" the dates in between the above dates....

    Can this be done??? or should be approach this from a different
    angle??

    Thanks
    Eric Venden
  • Mark Reed

    #2
    Re: Date function

    With the setup you have, you could get a list of all the people off on a
    certain date by running a sub-query. Something like:

    SELECT ur_tbl.*
    FROM ur_tbl
    WHERE (((ur_tbl.name) In (select [name] from ur_tbl where [Enter Date]
    between [ur_tbl].[start] and [ur_tbl].[end];)));

    "EV" <ericv@village. gurnee.il.us> wrote in message
    news:4c7b9cf8.0 408051133.49ba5 a69@posting.goo gle.com...[color=blue]
    > We have a personnel database that we want to set up...For time off we
    > will have a start date field and an end date field as well as a field
    > for the number of hours. We need to determine how many people (via
    > query) will be off for any given day (date) - for example:
    >
    > Roy is off 8/9/04 (start date field) - 8/12/04 (end date field)
    > Bob is off 8/7/04 (start date field) - 8/10/04 (end date field)
    > Steve is off 8/4/04 (start date field) - 8/9/04 (end date field)
    >
    > We need to know how many people will be off on 8/9/04 - so we need to
    > "calculate" the dates in between the above dates....
    >
    > Can this be done??? or should be approach this from a different
    > angle??
    >
    > Thanks
    > Eric Venden[/color]


    Comment

    Working...