Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 15th, 2003, 08:30 PM
Authorized User
 
Join Date: Oct 2003
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Default using the server's time?

How do I use the server's time and date as variables in an if statement?
for example:

if 'server's date here' = 'some preset date' Then
Response.Redirect...etc.
End if

Also, what format is the date in? Let's say I would want to redirect to a certain page depending on whether the date was even or odd. How would I do this?
 
Old December 16th, 2003, 03:07 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,110
Thanks: 0
Thanked 3 Times in 3 Posts
Default

the format depends on the whatever date function you use.

Now() returns 12/16/2003 2:06:55 PM

for the even and odd you will have to pull out the day number and run maybe a SELECT CASE statement.

http://msdn.microsoft.com/library/de.../vsfctdate.asp





Similar Threads
Thread Thread Starter Forum Replies Last Post
Time Shift time in minus time out lechalas Beginning VB 6 1 August 11th, 2008 01:56 PM
How to log to server's event log LenexaKS Access VBA 4 March 11th, 2008 12:49 PM
Using xs:time to generate time in desired format krayan001 XSLT 0 June 27th, 2005 04:28 PM
Interacting with Server's Desktop CCSBuz Classic ASP Professional 0 February 13th, 2005 02:26 AM
web server's that support aspx badgolfer ASP.NET 1.0 and 1.1 Basics 1 January 4th, 2005 12:34 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.