Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
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 March 18th, 2007, 04:39 AM
Authorized User
 
Join Date: Dec 2005
Location: , , .
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Default display server time

Dear All,

i want to display the server time and change it to another time zone.

ex: 10:30 am to be 12:30 pm

can you help me in this?


 
Old March 18th, 2007, 06:16 PM
Friend of Wrox
Points: 6,664, Level: 34
Points: 6,664, Level: 34 Points: 6,664, Level: 34 Points: 6,664, Level: 34
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2004
Location: Sydney, NSW, Australia.
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

You can not change a server to another time zone uless you have admin rights. If you use a host, no chance.

To display the server time use the following syntax:
 <%= now() %>

If you want to add or subtract time use tyhe dateAdd function. Do you want to add 14 hours? If so:

<%= DateAdd("h", 14, now()) %>



Wind is your friend
Matt




Similar Threads
Thread Thread Starter Forum Replies Last Post
Display current time 'fast' on a form. jpool Visual Basic 2005 Basics 1 July 4th, 2008 01:39 PM
time in sql server is not real time hertendreef SQL Server 2005 6 April 19th, 2007 07:07 AM
How to display the time(running time) in Excel swaroop Excel VBA 1 March 29th, 2007 01:56 AM
Display time on the report rajanikrishna Crystal Reports 0 March 11th, 2005 06:17 AM
Display Continuous Time mjwelker VB.NET 2002/2003 Basics 1 May 4th, 2004 08:31 AM





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