Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Feb 2007
    Posts
    219
    Thanks
    25
    Thanked 1 Time in 1 Post

    weeknumber /days (date)

    Hi, how to retrieve the days of the week, if only a weeknumber is given..

    for example if someone enters weeknumber 27, how can I retrieve the days:
    2-7-2007
    3-7-2007
    4-7-2007
    5-7-2007
    6-7-2007
    7-7-2007
    8-7-2007 ?

    Thanks

  • #2
    Regular Coder
    Join Date
    Mar 2007
    Posts
    505
    Thanks
    1
    Thanked 19 Times in 19 Posts
    There isn't a specific ASP function to do that for you. You will need to write one.

    Basically, start at the beginning of the year and use a DATEADD. You will want to add 7 * (weekNumber) to add the number of days since START_OF_YEAR.

    Code:
    DateAdd("d",7*weekNumber,"1/1/"&year())
    * the above code is untested
    To say my fate is not tied to your fate is like saying, 'Your end of the boat is sinking.' -- Hugh Downs
    Please, if you found my post helpful, pay it forward. Go and help someone else today.


  •  

    Posting Permissions

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