+ Reply to Thread
Results 1 to 5 of 5

start/end dates of a week given just the weeknum() value

  1. #1
    David
    Guest

    start/end dates of a week given just the weeknum() value

    Hi

    I see weeknum() can return a week number given a date.
    However I need to reverse this procedure and calculate the START and END
    dates for a week given just the weeknumber [weeknum() ] for the week
    concerned

    for example, given

    week number 50 I need to return Dec 5 (start) and Dec 11 (end)
    week number 51 I need to return Dec 12 (start) and Dec 18 (end)

    thanks , David


  2. #2
    CLR
    Guest

    RE: start/end dates of a week given just the weeknum() value

    Maybe this..........
    With your weeknumber in A1,
    This in B1
    =TEXT(38353+(A1*7)-7,"mm/dd/yy")
    This in C1
    =TEXT(38353+(A1*7)-1,"mm/dd/yy")

    Vaya con Dios,
    Chuck, CABGx3






    "David" wrote:

    > Hi
    >
    > I see weeknum() can return a week number given a date.
    > However I need to reverse this procedure and calculate the START and END
    > dates for a week given just the weeknumber [weeknum() ] for the week
    > concerned
    >
    > for example, given
    >
    > week number 50 I need to return Dec 5 (start) and Dec 11 (end)
    > week number 51 I need to return Dec 12 (start) and Dec 18 (end)
    >
    > thanks , David
    >


  3. #3
    Earl Kiosterud
    Guest

    Re: start/end dates of a week given just the weeknum() value

    David,

    For the start date:
    =(A2-2)*7+DATEVALUE("Jan 3, 2005")

    end date:
    =(A2-2)*7+DATEVALUE("Jan 3, 2005") + 6

    These are hard-coded for year 2005. The jan 3 date is the date on which
    week 2 starts for the year of interest. To make this work over various
    years will take more.

    Earl Kiosterud
    www.smokeylake.com

    "David" <[email protected]> wrote in message
    news:[email protected]...
    > Hi
    >
    > I see weeknum() can return a week number given a date.
    > However I need to reverse this procedure and calculate the START and END
    > dates for a week given just the weeknumber [weeknum() ] for the week
    > concerned
    >
    > for example, given
    >
    > week number 50 I need to return Dec 5 (start) and Dec 11 (end)
    > week number 51 I need to return Dec 12 (start) and Dec 18 (end)
    >
    > thanks , David
    >




  4. #4
    David
    Guest

    Re: start/end dates of a week given just the weeknum() value

    thanks Earl

    "Earl Kiosterud" wrote:

    > David,
    >
    > For the start date:
    > =(A2-2)*7+DATEVALUE("Jan 3, 2005")
    >
    > end date:
    > =(A2-2)*7+DATEVALUE("Jan 3, 2005") + 6
    >
    > These are hard-coded for year 2005. The jan 3 date is the date on which
    > week 2 starts for the year of interest. To make this work over various
    > years will take more.
    >
    > Earl Kiosterud
    > www.smokeylake.com
    >
    > "David" <[email protected]> wrote in message
    > news:[email protected]...
    > > Hi
    > >
    > > I see weeknum() can return a week number given a date.
    > > However I need to reverse this procedure and calculate the START and END
    > > dates for a week given just the weeknumber [weeknum() ] for the week
    > > concerned
    > >
    > > for example, given
    > >
    > > week number 50 I need to return Dec 5 (start) and Dec 11 (end)
    > > week number 51 I need to return Dec 12 (start) and Dec 18 (end)
    > >
    > > thanks , David
    > >

    >
    >
    >


  5. #5
    David
    Guest

    RE: start/end dates of a week given just the weeknum() value

    thanks Chuck


    "CLR" wrote:

    > Maybe this..........
    > With your weeknumber in A1,
    > This in B1
    > =TEXT(38353+(A1*7)-7,"mm/dd/yy")
    > This in C1
    > =TEXT(38353+(A1*7)-1,"mm/dd/yy")
    >
    > Vaya con Dios,
    > Chuck, CABGx3
    >
    >
    >
    >
    >
    >
    > "David" wrote:
    >
    > > Hi
    > >
    > > I see weeknum() can return a week number given a date.
    > > However I need to reverse this procedure and calculate the START and END
    > > dates for a week given just the weeknumber [weeknum() ] for the week
    > > concerned
    > >
    > > for example, given
    > >
    > > week number 50 I need to return Dec 5 (start) and Dec 11 (end)
    > > week number 51 I need to return Dec 12 (start) and Dec 18 (end)
    > >
    > > thanks , David
    > >


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1