Re: How to select between a range of dates?

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: 04Ram (04Ram_at_discussions.microsoft.com)
Date: 11/02/04


Date: Mon, 1 Nov 2004 19:54:03 -0800

A 90 day, 9 month, or 18 month review is based strictly on their hire date.
ie if someone was hired on 01/01/04 then their 90 day review would be due 90
days from their hire date, and then 9 months from their hire date, and 18
months from their hire date. It does not depend on the quarter at all. For
instance you would have reviews due for new hires that are under the 2 year
rule for every month. Only when they reach their 2 year mark would they move
to the quarterly review cycle. This can be on two separate queries. I hope
that this helps.

"John Spencer (MVP)" wrote:

> Need more details on how you decide someone is due a 90 day review or a 9 month
> review or an 18 month review.
>
> I'm going to guess that you want to get them if they fall in the quarter.
>
> WHERE DateAdd("D",90,HIREDATE) Between #02/16/2004# AND #05/15/2004# OR
> DateAdd("M",9,HIREDATE) Between #02/16/2004# AND #05/15/2004# OR
> DateAdd("M",18,HIREDATE) Between #02/16/2004# AND #05/15/2004# OR
> Format(HireDate,"mmdd") BETWEEN "0216" and "0515"
>
> That won't flag which type of review is due (Standard Annual, 90 day, etc) but
> it will select the people for review.
>
> 04Ram wrote:
> >
> > MVP this really helped me out. I have one more question though. Until an
> > associate reaches 2 years their review is dependant on their hire date. For
> > example an associate was hired on 02/12/04. They have a 90 day review, a 9
> > month review, and a 18 month review. When they hit 2 years then their review
> > date is what I described before. How can I incorporate this into the query so
> > that I can only get those associates that have more than 2 years and another
> > one that retrieves those under 2 years. The problem is that those under 2
> > years would be year dependant. I am guessing that this would be 2 different
> > querries. Thanks.
> >
> > "John Spencer (MVP)" wrote:
> >
> > > Interesting problem. Because of the year wrap, the January Reviews would be
> > > based on
> > >
> > > WHERE Format(HireDate,"mmdd") BETWEEN "1116" and "1231" OR
> > > Format(HireDate,"mmdd") BETWEEN "0101" and "0215"
> > >
> > > The other 3 quarters would be simpler
> > >
> > > WHERE Format(HireDate,"mmdd") BETWEEN "0216" and "0515"
> > >
> > > WHERE Format(HireDate,"mmdd") BETWEEN "0516" and "0815"
> > >
> > > WHERE Format(HireDate,"mmdd") BETWEEN "0816" and "1115"
> > >
> > > I will have to ponder awhile on how to generalize this. Or hope someone else
> > > has already worked out a method.
> > >
> > >
> > > 04Ram wrote:
> > > >
> > > > I am trying to set up a query that finds hire date between a range of dates.
> > > > I know that I can use the between function to do this. It is irregardless of
> > > > year, just on the month and day. e.g. January reviews are from 11/16 to
> > > > 02/15. Is there a way to do this without using the year?
> > >
>



Relevant Pages

  • Re: Turn off Reviewing in Word 2003
    ... To add to what Bob has said, you may want to read "Review Toolbar Annoyance" ... Word MVP FAQ site: http://word.mvps.org ... Changes feature & doesn't realize that she is broadcasting the doc's ...
    (microsoft.public.word.newusers)
  • Re: Converting VB6 to C#
    ... So you're saying the review is no good? ... Alvin Bruney [MVP ASP.NET] ... C++ to Java ... > job of performing the conversion. ...
    (microsoft.public.dotnet.framework)
  • Re: Should I use mutex in this context?
    ... old program and I think you need to review the differences of BeginThread/Ex and CreateThread, etc - a subject I long forgotten and don't worry about anymore. ... mean about 1 reader thread and 1 writer thread and especially the idea of how that relates to "contention", well, I don't understand why the brush back but only to see it as yet another "pounding" of the chest, looking for something beyond cooperative newsgroup participation with cockiness and rudeness. ... greater defined life and role here as an MVP so I am not going to challenge you any further - i.e. ... I am not here to make your life harder. ...
    (microsoft.public.vc.language)
  • Re: get a ink to open in a new browser window
    ... Review your work. ... David Bartosik - MS MVP ... for Publisher help: ...
    (microsoft.public.publisher.webdesign)
  • Re: Query look up
    ... I have a query that looks up testing being done. ... After I review the record ... You would base the Combo on a Query with a criterion selecting the ... John W. Vinson [MVP] ...
    (microsoft.public.access.gettingstarted)