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. Advertisements

  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. Advertisements

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. Matt
    Replies:
    1
    Views:
    838
    Matthew Speed
    Nov 8, 2003
  2. Peter Grison

    Date, date date date....

    Peter Grison, May 28, 2004, in forum: Java
    Replies:
    10
    Views:
    3,786
    Michael Borgwardt
    May 30, 2004
  3. Matt
    Replies:
    2
    Views:
    753
    Pete Becker
    Nov 8, 2003
  4. Matt
    Replies:
    3
    Views:
    936
    Richard Heathfield
    Nov 8, 2003
  5. Deniz Bahar
    Replies:
    2
    Views:
    739
    Andrey Tarasevich
    Mar 9, 2005
  6. =?ISO-8859-2?Q?Miros=B3aw?= Makowiecki

    Reading of file by next of map file and by next of file descriptor.

    =?ISO-8859-2?Q?Miros=B3aw?= Makowiecki, Jul 10, 2007, in forum: C++
    Replies:
    1
    Views:
    977
    Alf P. Steinbach
    Jul 10, 2007
  7. Matt
    Replies:
    11
    Views:
    648
    Aaron Bertrand [MVP]
    Nov 8, 2003
  8. Tad McClellan
    Replies:
    3
    Views:
    363
    Edward Wijaya
    May 13, 2004
Loading...