473,387 Members | 1,711 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Displaying next sunday's date



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!
Jul 19 '05 #1
1 5065
<%
nextSunday = dateadd("d", 8-datepart("w", date()), date())
response.write nextSunday
response.write "<p>"
response.write formatdatetime(nextSunday, 1)
%>


"J. Muenchbourg" <jo*****@canada.com> wrote in message
news:ux*************@tk2msftngp13.phx.gbl...


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!

Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Eric Linders | last post by:
Hello, Today is Thursday, August 18, 2004. I would like to have a variable that stores the date this coming Sunday (even if today happened to be Sunday) in YYY-MM-DD format. I also need a...
1
by: Mark ??;-\) | last post by:
I would like to display a listing of files on a web page as follows: If there is only one file: display the section name and then display the current file. If there is more than one file (for...
2
by: Russ | last post by:
I've got a report that puts dates at the top of columns and the user is prompted to enter a beginning date when the report is opened. That date is put in a textbox in the first column like this: ...
6
by: Matt K. | last post by:
Hi there, I have a form in an Access project that contains a subform which displays the results of a query of the style "select * from where = #a certain date#". In the main part of the form...
1
by: rock72 | last post by:
Hello Everyone, Can you tell me how to produce a query that when Login Date (entry) is Sunday. First, check if the Sunday Date occur on 7th day of his duty. Example 1: Login Date no. of...
5
by: Parintas Themis STE Kardias | last post by:
Hi How can i have in a textbox the first sunday of a month
9
by: griemer | last post by:
Hi every one, Is there a way to calculate the timestamp of 00:00:00 last Sunday. For me, this is the begin of the current week.. Or, how old is this week, in seconds Any ideas? Regards,
1
by: Keychain | last post by:
I'm stuck on what seems like should be a relatively easy problem. I'm creating a simple scheduler. From a form consisting of seven checkboxes (one for each day of the week) the user selects the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.