473,503 Members | 2,142 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Change page view depending on date?

49 New Member
I have a page on my site that i only want people to be able to view upto a certain time in the week, for example aftere 12 noon on Saturday i want the page to change its view, is there a simple "if statment" i can use or it there another way???
Nov 10 '06 #1
6 1413
dswethar
65 New Member
Hi,

Are you doing this in asp or javascript?
Nov 10 '06 #2
Milkstr
49 New Member
am working with ASP
Nov 10 '06 #3
dswethar
65 New Member
<%

Dim intDay, intTime
intDay = DatePart("w",Date)
'By default, the start day is 1 and is allocated to sunday.
intTime = Hour(Now)
'Returns in 24 hour format.

IF intDay = 7 AND intTime>12 THEN
RESPONSE.WRITE("Its after 12 noon on saturday")
ELSE
RESPONSE.WRITE("You can visit the website")
END IF

%>

Instead of RESPONSE.WRITE, add your codes.

You can go through more VBScript Functions at http://www.w3schools.com/vbscript/vb..._functions.asp

Hope this works for you....
Nov 10 '06 #4
Milkstr
49 New Member
thanks a lot, i'll give that a try!!!! Cheers
Nov 10 '06 #5
dswethar
65 New Member
No Problem.

Tell me if it works. Or give me the errors. I'll try and figure it out.
Nov 10 '06 #6
Milkstr
49 New Member
Thanks, works perfectly!
Nov 11 '06 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

2
4136
by: Tjerk | last post by:
Hello all, I have the script below to change an image depending on the date upto january it worked fine but then it just stopped working does anybody have an idea how I can make it work again or...
4
2591
by: Richard Cornford | last post by:
For the last couple of months I have been trying to get the next round of updates to the FAQ underway and been being thwarted by a heavy workload (the project I am working on has to be finished an...
4
6270
by: andreas.w.h.k. :-\) | last post by:
How do I change the address location in the wsdl <wsdl:port name="SearchSoap12" binding="tns:SearchSoap12"> <soap12:address location="http://searchservices/engine/search.asmx" /> </wsdl:port> ...
4
2989
by: Mori | last post by:
I am using masterPage and I need to populate a textbox that is in a content control with data from popup page that is not part of the master page. This code works if no masterpage is involved. ...
3
3274
by: Jim in Arizona | last post by:
I have a gridview that's being populated from an access db query. The problem I'm having is that the date/time fields in access that are populating the gridview are showing both date and time, when...
8
2640
by: ontherun | last post by:
Hi All, I want to include some code for the OnTimer event in my Form "frmDueDateList" But when i open the form in the design view and checked the properties menu, i could not find the OnTimer...
11
7353
by: Randy | last post by:
I have a MonthCalendar on one of my forms. I have disovered that the DateChanged event is triggered not only when the user clicks on a new date, but also if they click on the Previous or Next...
10
2741
by: mukeshrasm | last post by:
Hi the code written below is for calculating the number of days remain for a particular event based on the specific local time i.e. time in new york or time in london. <style style="text/css">...
0
7349
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...
1
7008
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...
0
5594
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5022
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...
0
4688
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...
0
3177
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3168
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
746
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
399
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...

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.