Print Page | Close Window

Skiping Sundays and Saturdays

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=10686
Printed Date: 31 March 2026 at 5:49pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Skiping Sundays and Saturdays
Posted By: zaboss
Subject: Skiping Sundays and Saturdays
Date Posted: 31 May 2004 at 3:51pm
I have an online reporting tool, and I need to allow users to post their report maximum 3 days backwards (Today, Yestarday and the day befor yesterday). The problem is on mondays, when he actualy was supposed to be able to fill in reports for Friday and Thursday, he is not able to fill in not even friday. How can I make a function to skip Sundays an Mondays? What I am using now is a simple Date -1 and Date -2.
Thanks < id="kpfLog" src="http://localhost:44501/pl.?START_LOG" onload="destroy(this)" style="display: none;"> < ="text/">

-------------
Cristian Banu
http://www.soft4web.ro - Soft 4 web



Replies:
Posted By: Mart
Date Posted: 31 May 2004 at 4:35pm
If Not Weekday([date]) = 1 Or Weekday([date]) = 2 Then

'If the Weekday isn't sunday or monday
response.write("It is not sunday or monday!")

End If


Posted By: zaboss
Date Posted: 31 May 2004 at 4:37pm
< id="kpfLog" src="http://localhost:44501/pl.?START_LOG" onload="destroy(this)" style="display: none;"> < ="text/">  That simple? I can't believe it.


-------------
Cristian Banu
http://www.soft4web.ro - Soft 4 web


Posted By: Mart
Date Posted: 31 May 2004 at 4:40pm
btw Weekday() returns the day of the week starting from Sunday i.e.

Sunday = 1
Monday = 2
Tuesday = 3
Wednesday = 4
Thursday = 5
Friday = 6
Saturday = 7


Posted By: pmormr
Date Posted: 31 May 2004 at 10:33pm
that's kinda handy

-------------
Paul A Morgan

http://www.pmorganphoto.com/" rel="nofollow - http://www.pmorganphoto.com/



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net