Results 1 to 6 of 6
  1. #1
    Join Date
    Aug 2009
    Posts
    13

    Unanswered: Work Week Question

    Hi,

    I've got a question that is bugging the hell out of me, I've googled it for ages and can't find the answer. It's probably very simple, but my coding is rather limited to say the least.

    I have a label that shows the current work week:

    =Format(Date(),"ww")

    All I want is to have several other labels showing the consecutive work weeks which I would imagine would be something along the lines of:

    =Format(Date(),"ww"+1)
    =Format(Date(),"ww"+2)

    But they don't work, be really appreciative if someone can give me the simple equation and make me feel stupid!!

    Thanks.

  2. #2
    Join Date
    Jul 2004
    Location
    South Dakota
    Posts
    267
    Think you would need to try something like this:

    Format(Datadd("ww", 1, Now()), "ww")

    C

  3. #3
    Join Date
    Sep 2002
    Location
    South Wales
    Posts
    580
    format(dateadd("ww",1,date()),"ww")

    Will give you the week as of a week today.

    This uses the DateAdd function - I guess there is more to what you are trying to acheive but see how you progress given this info...
    Windows Server 2003-8 / Terminal Services / SQL 2000 / Access 2003 / Office 2003-7 / Exchange 2003-7 / Blackberry Enterprise Server / AutoCAD / Lambert And Butler / Red Bull

  4. #4
    Join Date
    Aug 2009
    Posts
    13
    Thanks guys,

    The quick response is well appreciated.

    It's not as simple as I thought!! Gareths solution seems to do the job just fine though.

    Cheers,

    Lee

  5. #5
    Join Date
    Sep 2007
    Location
    Global Village
    Posts
    185
    Try this
    =Format(Date()+7, "ww")
    <<Never Walk on the Traveled Path, Because it only Leads you to where the Others have been.>>
    Graham Bell

  6. #6
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    Actually, it really is as simple as you thought! There's no need to use DateAdd() here. You simply need to add the 1 or 2 after you've determined the week, by moving the 1 or 2 outside of the parens !

    Format(Date,"ww")+1

    Format(Date,"ww")+ 2
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

Posting Permissions

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