Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2004
    Location
    Liverpool, NY USA
    Posts
    2,509

    Unanswered: Need to find the date of the next saturday.

    I am writting a select and I need to test to see if a termination date is >= to the previous saturday. For example, If today is November 2nd, I want to exclude any termination dates before saturday October 23rd. I can do this in oracle using the NEXT_DAY function (SEE BELOW)

    SQL> select next_day(sysdate-15,'SAT') FROM DUAL;

    NEXT_DAY(
    ---------
    23-OCT-04

    select ...
    from ...
    where termdate >= next_day(sysdate-15,'SAT') and ...

    Does access 97 have a function that would produce the same result that I could use in the where clause of a select?

    Thanks for any help you can give me.
    Last edited by beilstwh; 11-02-04 at 13:13.
    Bill
    You do not need a parachute to skydive. You only need a parachute to skydive twice.

  2. #2
    Join Date
    Jun 2004
    Location
    Liverpool, NY USA
    Posts
    2,509
    I did a kludge to fix the problem


    select ....
    from ....
    where (choose(dateweek(date()),date() - 8,date() - 9,date() - 10,date() - 11,date() - 12,date() - 13,date() - 14) <= termdate AND ...

    It works, but I sure miss the rich set of functions from Oracle.
    Bill
    You do not need a parachute to skydive. You only need a parachute to skydive twice.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •