Displaying next sunday's date

Discussion in 'ASP General' started by J. Muenchbourg, Sep 17, 2003.

  1. Looking thru my resources, I cannot find a simple way of displaying next
    sunday's date depending on what todays date is. I'd like to do it
    without doing 7 if statements or case select:

    todaysdate = now
    sundaysdate = weekday(todaysdate + ?)

    ??
    muench

    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
    J. Muenchbourg, Sep 17, 2003
    #1
    1. Advertising

  2. <%
    nextSunday = dateadd("d", 8-datepart("w", date()), date())
    response.write nextSunday
    response.write "<p>"
    response.write formatdatetime(nextSunday, 1)
    %>




    "J. Muenchbourg" <> wrote in message
    news:...
    >
    >
    > Looking thru my resources, I cannot find a simple way of displaying next
    > sunday's date depending on what todays date is. I'd like to do it
    > without doing 7 if statements or case select:
    >
    > todaysdate = now
    > sundaysdate = weekday(todaysdate + ?)
    >
    > ??
    > muench
    >
    > *** Sent via Developersdex http://www.developersdex.com ***
    > Don't just participate in USENET...get rewarded for it!
    Aaron Bertrand - MVP, Sep 17, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. TaeHo Yoo
    Replies:
    2
    Views:
    435
    David
    Oct 24, 2003
  2. Peter Grison

    Date, date date date....

    Peter Grison, May 28, 2004, in forum: Java
    Replies:
    10
    Views:
    3,196
    Michael Borgwardt
    May 30, 2004
  3. Guido van Rossum
    Replies:
    0
    Views:
    266
    Guido van Rossum
    Jan 30, 2004
  4. Replies:
    0
    Views:
    256
  5. Deniz Bahar
    Replies:
    2
    Views:
    447
    Andrey Tarasevich
    Mar 9, 2005
Loading...

Share This Page