Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Skiping Sundays and Saturdays
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Skiping Sundays and Saturdays

 Post Reply Post Reply
Author
zaboss View Drop Down
Senior Member
Senior Member


Joined: 20 August 2002
Location: Romania
Status: Offline
Points: 454
Post Options Post Options   Thanks (0) Thanks(0)   Quote zaboss Quote  Post ReplyReply Direct Link To This Post Topic: Skiping Sundays and Saturdays
    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
Soft 4 web
Back to Top
Mart View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 November 2002
Status: Offline
Points: 2304
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mart Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
zaboss View Drop Down
Senior Member
Senior Member


Joined: 20 August 2002
Location: Romania
Status: Offline
Points: 454
Post Options Post Options   Thanks (0) Thanks(0)   Quote zaboss Quote  Post ReplyReply Direct Link To This Post 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
Soft 4 web
Back to Top
Mart View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 November 2002
Status: Offline
Points: 2304
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mart Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
pmormr View Drop Down
Senior Member
Senior Member


Joined: 06 January 2003
Location: United States
Status: Offline
Points: 1479
Post Options Post Options   Thanks (0) Thanks(0)   Quote pmormr Quote  Post ReplyReply Direct Link To This Post Posted: 31 May 2004 at 10:33pm
that's kinda handy
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.