473,769 Members | 2,331 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Weekend dates

I have a sql database and ASP pages.

How do I find out the DATES of THIS WEEKEND (fri-sun).

If today is Tuesday, I want to show information posted for THIS WEEKEND.

My table has a field called THEDATE which is what we need to search and
in the format MM/DD/YYYY.

Thanks!


*** Sent via Developersdex http://www.developersdex.com ***
Feb 21 '07 #1
2 1764
Joey Martin wrote:
I have a sql database and ASP pages.

How do I find out the DATES of THIS WEEKEND (fri-sun).

If today is Tuesday, I want to show information posted for THIS
WEEKEND.

My table has a field called THEDATE which is what we need to search
and in the format MM/DD/YYYY.

Thanks!
What is the datatype of THEDATE? if it's a datetime field, then the
format is irrelevant.
If it's datetime, are you storing time as well as date in the field ?

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Feb 21 '07 #2
"Joey Martin" wrote:
How do I find out the DATES of THIS WEEKEND (fri-sun).

If today is Tuesday, I want to show information posted for THIS
WEEKEND.

My table has a field called THEDATE which is what we need to
search and in the format MM/DD/YYYY.
What does "this weekend" mean? The coming weekend? Specifically, when does
it transition to the next one? On Saturday? On Monday?

Also, do you want to compute this in the database or in your web script? In
either case, what is the environment (ASP: JScript/VBScript, database: SQL
Server/Oracle/MySQL/MS Access)?


--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms.

Feb 22 '07 #3

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

Similar topics

0
1074
by: Barry Warsaw | last post by:
The current mail.python.org machine has had many problems over the last few weeks, and it's time to move. Also, we have a deadline of 06-Jul-2004 before ZopeCorp and Baymountain decommission the machine and pull the plug on it. Fortunately, Thomas Wouters and the fine folks at XS4ALL have donated a machine, and your friendly neighborhood volunteer postmasters have been working round the clock (okay, in 3-minute chunks while we recompile...
1
1606
by: Travis L. Alltop | last post by:
All, To make a long story short, we are swapping out the "knock-off" drives that the NA purchased on E-Bay in one of our production SQL Servers (SQL Server 2000 Enterprise) this weekend for brand new ones (Compaq 15K RPM 32GB drives). We are currently experiencing ASR almost on a daily basis and it is really causing a disription in service. SO, The Network Admin ahs made this decison to replace these drives in attempt to solve this....
7
13459
by: AdityaK | last post by:
Is there a way to find Weekend date for a given date using a DB2 query? I see that there are scalar functions such as DAY, DAYOFMONTH, DAYOFWEEK,etc are available...but couldn't find one to get a weekend date for any given date. Any information is appreciated. Thanks, Aditya.
3
1806
by: William Ryan | last post by:
Good evening :), I got out this afternoon and tried to get a bit of X-mas shopping done and a few other things taken care of...not a whole lot of luck, though...tons of people doing the same thing I was. But I just got in a bit ago. I take it you are still in a hotel this weekend? I hate that...I was really hoping you would be home this weekend. But oh well, you have to do what you have to do, I guess...:) I am not what you would call...
3
1913
by: darnnnel | last post by:
Hey guys, i have this code: SELECT * FROM QueryCases WHERE Weekday(QueryCases.StartDate) In ('1','7') AND QueryCases.Completed = False ORDER BY QueryCases.StartDate; the WHERE Weekday(QueryCases.StartDate) In ('1','7') returns any weekend records, how do i set criteria to only show weekend records for this coming weekend. Thanks in advance
0
979
by: Trent Nelson | last post by:
Just a friendly reminder that this weekend is the Python sprint weekend! Look forward to seeing everyone on #python-dev irc.freenode.net over the course of the weekend! Trent. On 16 Apr, 18:52, Trent Nelson wrote:
30
2853
by: Paul W Smith | last post by:
I have written a hit counter, which I believe counts the times my page is hit by a user for each unique session by the user. The relevant part of my code is below: If IsEmpty(Session("TotalCount")) Then ' Increment or reset the count If Weekday(Date(),vbSunday) = 1 And dtDate <Date then
7
3224
by: Mike | last post by:
I have a routine that's calculating business days but its not counting the weekend days that are between the start date and end date. If my start date is 9/26/08 and my end date is 10/01/08, I should see 4 business days and 2 weekend days. How can I get that result? I'm getting 4 business days but its not counting the weekend days?
4
2019
Manikgisl
by: Manikgisl | last post by:
HI, I have two different dates 26-12-2008 to 26-01-2009 these are the two dates .. i want calculate number of saturday and sundays in between two dates
0
10222
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10050
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9999
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9866
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7413
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6675
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5448
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3570
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.