Print Page | Close Window

Is there any way to format the time..

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=4627
Printed Date: 30 March 2026 at 10:06am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Is there any way to format the time..
Posted By: worldwide1504
Subject: Is there any way to format the time..
Date Posted: 30 July 2003 at 7:41pm
< =text/>zwZzso(1,"zwZTimeout('enableDesignMode()', 20);"); Is there a way I can display the time using ASP, and have it display a certain time zone for everyone who sees it?



Replies:
Posted By: stephen
Date Posted: 31 July 2003 at 12:59am

DateAdd(interval, number, date)
response.write dateadd("h", -3, now())

You can detect the time difference between the browser time (JavaScript) and the server time.



-------------
"Doing easily what others find difficult is talent; Doing what is impossilbe for talent is genius." -- Henri Frederic Amiel ( 1828-1881)
http://www.121People.com - www.121People.com


Posted By: b_bonnett
Date Posted: 31 July 2003 at 2:47am

For formatting the date see http://www.w3schools.com/vbscript/func_formatdatetime.asp - http://www.w3schools.com/vbscript/func_formatdatetime.asp .

For adding / subtracting amounts of time, see http://www.w3schools.com/vbscript/func_dateadd.asp - http://www.w3schools.com/vbscript/func_dateadd.asp .

Hope this helps,
Blair



-------------
Webmaster, http://www.planegallery.net/ - The Plane Gallery
Greetings From Christchurch


Posted By: worldwide1504
Date Posted: 31 July 2003 at 7:37am

< =text/>zwZzso(1,"zwZTimeout('enableDesignMode()', 20);"); Ok, Pacific Time is what I want shown for everyone.

But what if people from two different time zones view it...is it going to show Pacifice Time for both of them or there time subtract 3?



Posted By: b_bonnett
Date Posted: 31 July 2003 at 3:42pm

It'll show Pacific Time - in ASP, the current time - i.e. the Now() command - is taken from the server, so it won't change for different users.

Blair



-------------
Webmaster, http://www.planegallery.net/ - The Plane Gallery
Greetings From Christchurch


Posted By: worldwide1504
Date Posted: 03 August 2003 at 10:49am
< =text/>zwZzso(1,"zwZTimeout('enableDesignMode()', 20);"); Ok, thanks.



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