Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Displaying next sunday's date

Reply
Thread Tools

Displaying next sunday's date

 
 
J. Muenchbourg
Guest
Posts: n/a
 
      09-17-2003


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!
 
Reply With Quote
 
 
 
 
Aaron Bertrand - MVP
Guest
Posts: n/a
 
      09-17-2003
<%
nextSunday = dateadd("d", 8-datepart("w", date()), date())
response.write nextSunday
response.write "<p>"
response.write formatdatetime(nextSunday, 1)
%>




"J. Muenchbourg" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
>
> 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!



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CurrentElement->next = CurrentElement->next->next (UNDEFINED?) Deniz Bahar C Programming 2 03-09-2005 12:45 AM
Date, date date date.... Peter Grison Java 10 05-30-2004 01:20 PM
Given a date, how to find the beginning date and ending date of that week Matt ASP .Net 1 11-08-2003 09:14 PM
Given a date, how to find the beginning date and ending date of that week Matt C Programming 3 11-08-2003 09:07 PM
Given a date, how to find the beginning date and ending date of that week Matt C++ 2 11-08-2003 08:30 PM



Advertisments