VBScript Time Function Conversion

Results 1 to 2 of 2

Thread: VBScript Time Function Conversion

  1. #1
    Join Date
    Dec 1969

    Default VBScript Time Function Conversion

    Considering the global variable "time" in VBScript, is there a way of displaying the time in a local fashion within ASP. For example, I believe the variable calculates time within the Eastern Time Zone; I live in the Mountain Time Zone. Thus, I&#039;m playing with this code on my ASP page: <BR><BR>&#060;body&#062;<BR>When the script ran, it was &#060;%Response.Write vTime%&#062; o&#039;clock on &#060;%=vDate%&#062;.<BR>The time is currently &#060;%=Now%&#062;.<BR>The hour is: &#060;%=hour(time)-2%&#062; <BR><BR>The "hour(time)" variable was easy to calculate. Converting the "vTime" (vTime=Time) and "Now" variables are another issue. Is there a special function or calculation to convert the time over to my local zone -- that is, Mountain Standard Time?<BR>

  2. #2
    Join Date
    Dec 1969

    Default Long thread on this...

    ...earlier today.<BR><BR>http://www.aspmessageboard.com/forum/asp.asp?M=518991&T=518991&F=20&P=1<BR><BR>See if that helps.<BR><BR>Oh, and Now() and Time() and Date() *ALL* depend on WHERE your *server* is running. So if your host is running in EST, then that&#039;s what you get.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts