Results 1 to 5 of 5
  1. #1
    Bronze Lounger
    Join Date
    Jun 2001
    Location
    New York, New York, Lebanon
    Posts
    1,449
    Thanks
    1
    Thanked 1 Time in 1 Post

    Find the two Sunday Dates (2003)

    <img src=/S/hello.gif border=0 alt=hello width=25 height=29> Loungers

    Its been a long time, so I hope this message finds you all well.

    I am developing a 2-week work schedule template. The weeks start on a Sunday and end on a Saturday.

    What I need to do is find the two Sunday dates, one for the first week, and then one for the 2nd week.

    So for example: If I am working on the schedule today October 31st 2008, and I am working on the schedule for the period starting Sunday November 9th and ending Saturday November 22nd, I need the Sunday dates of the 9th and the 16th.

    I know I can find the 2nd Sunday by adding 7 to the first Sunday, but how about finding the 1st Sunday?

    Thanks for any help.

    Wassim
    <img src=/S/compute.gif border=0 alt=compute width=40 height=20> in the <img src=/S/bagged.gif border=0 alt=bagged width=22 height=22>

  2. #2
    5 Star Lounger
    Join Date
    Aug 2004
    Location
    Connecticut, USA
    Posts
    816
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Find the two Sunday Dates (2003)

    To find the most recent Sunday:
    =A1-WEEKDAY(A1,1)+1
    where A1 contains the Date field you are calculating against. If the date is a Sunday, it will return that day.

  3. #3
    Bronze Lounger
    Join Date
    Jun 2001
    Location
    New York, New York, Lebanon
    Posts
    1,449
    Thanks
    1
    Thanked 1 Time in 1 Post

    Re: Find the two Sunday Dates (2003)

    <img src=/S/thankyou.gif border=0 alt=thankyou width=40 height=15> Mike

    Your formula is giving me the past Sunday date, I am looking for the future Sunday date.

    Thanks

    Wassim
    <img src=/S/compute.gif border=0 alt=compute width=40 height=20> in the <img src=/S/bagged.gif border=0 alt=bagged width=22 height=22>

  4. #4
    5 Star Lounger
    Join Date
    Aug 2004
    Location
    Connecticut, USA
    Posts
    816
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Find the two Sunday Dates (2003)

    Just add 7 to the original formula - assuming you are looking for the next Sundy froma given date.
    =A1-WEEKDAY(A1,1)+8

  5. #5
    Bronze Lounger
    Join Date
    Jun 2001
    Location
    New York, New York, Lebanon
    Posts
    1,449
    Thanks
    1
    Thanked 1 Time in 1 Post

    Re: Find the two Sunday Dates (2003)

    <img src=/S/thankyou.gif border=0 alt=thankyou width=40 height=15> Mike

    I did add the 7 to the formula and it is now being tested to see if it will cover the periods we need. Specially when the months change.

    <img src=/S/thankyou.gif border=0 alt=thankyou width=40 height=15> Thanks again.

    Wassim
    <img src=/S/compute.gif border=0 alt=compute width=40 height=20> in the <img src=/S/bagged.gif border=0 alt=bagged width=22 height=22>

Posting Permissions

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