![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Displaying Correct Time The school district I work for is in two timz zones. When I am in one time zone I want to subtract 1 hour. The other display the time in the server. What I have now is Display Time = <%Time -1.00%>. However it appears to be subtracting 11 hours instead of one hour. Does anyone know the quick and dirty to do this? Thanks in Advance Q! |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Displaying Correct Time "John Quinn" <JohnQuinn@xxxxxx> wrote in message news:0AD39F9C-C1A2-4D85-AD05-2DE3BBB2BA0E@xxxxxx Quote: > The school district I work for is in two timz zones. When I am in one > time > zone I want to subtract 1 hour. The other display the time in the server. > > What I have now is Display Time = <%Time -1.00%>. However it appears to be > subtracting 11 hours instead of one hour. > > Does anyone know the quick and dirty to do this? > > Thanks in Advance > > Q! alternative time and how you're calculating it. With a script? Batch file? If so, what is the code? |
My System Specs![]() |
| | #3 (permalink) |
| | Re: Displaying Correct Time It is in asp script. The code is : The Current Time is <%Time -1.00%> It appears simple, except it does not work. "Pegasus (MVP)" wrote: Quote: > > "John Quinn" <JohnQuinn@xxxxxx> wrote in message > news:0AD39F9C-C1A2-4D85-AD05-2DE3BBB2BA0E@xxxxxx Quote: > > The school district I work for is in two timz zones. When I am in one > > time > > zone I want to subtract 1 hour. The other display the time in the server. > > > > What I have now is Display Time = <%Time -1.00%>. However it appears to be > > subtracting 11 hours instead of one hour. > > > > Does anyone know the quick and dirty to do this? > > > > Thanks in Advance > > > > Q! > It is a little unclear from your post where you want to display the > alternative time and how you're calculating it. With a script? Batch file? > If so, what is the code? > > > |
My System Specs![]() |
| | #4 (permalink) |
| | Re: Displaying Correct Time Thanks for Getting Back to ME! Getting an Object Required Error on the second line of script. Error is: Microsoft VBScript runtime error '800a01a8' Object required: '' Here is my Current Script: <% dtTimeNow = DateAdd("h",-1,dtTimeNow) WScript.Echo dtTimeNow,DateAdd("h",-1,dtTimeNow),CDate( dtTimeNow - 1.0 ) %> What am I missing? I have never used WScript.Echo before, but I like what I read about it and plan to use it in the future. "ekkehard.horner" wrote: Quote: > John Quinn schrieb: Quote: > > The school district I work for is in two timz zones. When I am in one time > > zone I want to subtract 1 hour. The other display the time in the server. > > > > What I have now is Display Time = <%Time -1.00%>. However it appears to be > > subtracting 11 hours instead of one hour. > This > > dtTimeNow = Now > WScript.Echo dtTimeNow, DateAdd("h",-1,dtTimeNow ), CDate( dtTimeNow - 1.0 ) > 15.01.2009 16:48:50 15.01.2009 15:48:50 14.01.2009 16:48:50 > > > shows: > > (1) Date* functions should be used to manipulate dates > > (2) subtracting 1.0 from a date (internally represented by a floating > point number) will change the day part > |
My System Specs![]() |
| | #5 (permalink) |
| | Re: Displaying Correct Time John Quinn schrieb: Quote: > Thanks for Getting Back to ME! > > Getting an Object Required Error on the second line of script. > > Error is: > Microsoft VBScript runtime error '800a01a8' > > Object required: '' > > Here is my Current Script: > > <% > dtTimeNow = DateAdd("h",-1,dtTimeNow) > WScript.Echo dtTimeNow,DateAdd("h",-1,dtTimeNow),CDate( dtTimeNow - 1.0 ) > %> > > What am I missing? > > I have never used WScript.Echo before, but I like what I read about it and > plan to use it in the future. You can't use the WScript object (provided by the wscript.exe resp. cscript.exe host) in ASP. I included that line just to get the output; sorry about misleading you. Just use DateAdd() to calculate the 'other' time and display it. [...] |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| time not staying correct | Vista General | |||
| Thumbnails not displaying correct image | Vista music pictures video | |||
| Internet Time Synchronization Incorrect - Showing Standard Time | PowerShell | |||
| PLEASE HELP: What is the correct date/time on this image??? | Vista General | |||
| Correct RAM? | Vista General | |||