Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
inet
active_desktop
active_scrptng
asp.components
asp.db
asp.general
comctl32
comp.packaging
components.dev
dbweb
dhtml_editing
docobjects
html_authoring
html_objmodel
iis
iis.ftp
iis.security
iis.smtp_nntp
indexserver
misc
mshtml_hosting
scripting.jscript
scripting.vbscript
sdk_setup
shell_objmodel
urlmonikers
webbrowser_ctl
wininet
  
 
date: Mon, 21 Nov 2005 16:25:23 -0000,    group: microsoft.public.inetsdk.programming.scripting.vbscript        back       


Help ma boab - ah jist canny dae it.   
This is crazy,

The following page:

-------------------------------------------------------------
<%@ Page Language="VB" Debug="true" %>
<html>
<head>
</head>

<body>
<%=WeekDayName(Weekday(Today))%>
</body>

</html>
-------------------------------------------------------------

Returns "tomorrows day" on my server, every time.  Today it shows Tuesday.
If I change the date on my server clock to Tuesday 22nd November 2005, this
script will return a "Wednesday" - it is always out by a day.

I can obviously use this to fix temporarily:
<%=WeekDayName(Weekday(Today)-1)%>

But, I would love to figure out the problem.

Any ideas?

Regards,

Gary.
date: Mon, 21 Nov 2005 16:25:23 -0000   author:   unknown

Re: Help ma boab - ah jist canny dae it.   
Your lucky ..... using Today returns Saturday here, using Now instead,
returns Monday ;o)

http://mysteryfcm.plus.com/misc/pgweekday.asp

Using Today: <%=WeekDayName(Weekday(Today))%><br>
Using Now: <%=WeekDayName(Weekday(Now))%><br>

--
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

 wrote in message
news:dlssda$l5q$1$8300dec7@news.demon.co.uk...
> This is crazy,
>
> The following page:
>
> -------------------------------------------------------------
> <%@ Page Language="VB" Debug="true" %>
> <html>
> <head>
> </head>
>
> <body>
> <%=WeekDayName(Weekday(Today))%>
> </body>
>
> </html>
> -------------------------------------------------------------
>
> Returns "tomorrows day" on my server, every time.  Today it shows Tuesday.
> If I change the date on my server clock to Tuesday 22nd November 2005,
this
> script will return a "Wednesday" - it is always out by a day.
>
> I can obviously use this to fix temporarily:
> <%=WeekDayName(Weekday(Today)-1)%>
>
> But, I would love to figure out the problem.
>
> Any ideas?
>
> Regards,
>
> Gary.
>
>
>
date: Mon, 21 Nov 2005 18:14:11 -0000   author:   Steven Burn lid

Re: Help ma boab - ah jist canny dae it.   
Good man, thanks very much.  What causes the problem?

Regards.

Gary.




"Steven Burn" <somewhere@in-time.invalid> wrote in message 
news:%23sMsdds7FHA.3660@TK2MSFTNGP09.phx.gbl...
> Your lucky ..... using Today returns Saturday here, using Now instead,
> returns Monday ;o)
>
> http://mysteryfcm.plus.com/misc/pgweekday.asp
>
> Using Today: <%=WeekDayName(Weekday(Today))%><br>
> Using Now: <%=WeekDayName(Weekday(Now))%><br>
>
> --
> Regards
>
> Steven Burn
> Ur I.T. Mate Group
> www.it-mate.co.uk
>
> Keeping it FREE!
>
>  wrote in message
> news:dlssda$l5q$1$8300dec7@news.demon.co.uk...
>> This is crazy,
>>
>> The following page:
>>
>> -------------------------------------------------------------
>> <%@ Page Language="VB" Debug="true" %>
>> <html>
>> <head>
>> </head>
>>
>> <body>
>> <%=WeekDayName(Weekday(Today))%>
>> </body>
>>
>> </html>
>> -------------------------------------------------------------
>>
>> Returns "tomorrows day" on my server, every time.  Today it shows 
>> Tuesday.
>> If I change the date on my server clock to Tuesday 22nd November 2005,
> this
>> script will return a "Wednesday" - it is always out by a day.
>>
>> I can obviously use this to fix temporarily:
>> <%=WeekDayName(Weekday(Today)-1)%>
>>
>> But, I would love to figure out the problem.
>>
>> Any ideas?
>>
>> Regards,
>>
>> Gary.
>>
>>
>>
>
>
date: Tue, 22 Nov 2005 00:36:25 -0000   author:   unknown

Re: Help ma boab - ah jist canny dae it.   
There isn't such a function as Today?

 wrote in message 
news:dltp60$c5l$1$8302bc10@news.demon.co.uk...
> Good man, thanks very much.  What causes the problem?
>
> Regards.
>
> Gary.
>
>
>
>
> "Steven Burn" <somewhere@in-time.invalid> wrote in message 
> news:%23sMsdds7FHA.3660@TK2MSFTNGP09.phx.gbl...
>> Your lucky ..... using Today returns Saturday here, using Now instead,
>> returns Monday ;o)
>>
>> http://mysteryfcm.plus.com/misc/pgweekday.asp
>>
>> Using Today: <%=WeekDayName(Weekday(Today))%><br>
>> Using Now: <%=WeekDayName(Weekday(Now))%><br>
>>
>> --
>> Regards
>>
>> Steven Burn
>> Ur I.T. Mate Group
>> www.it-mate.co.uk
>>
>> Keeping it FREE!
>>
>>  wrote in message
>> news:dlssda$l5q$1$8300dec7@news.demon.co.uk...
>>> This is crazy,
>>>
>>> The following page:
>>>
>>> -------------------------------------------------------------
>>> <%@ Page Language="VB" Debug="true" %>
>>> <html>
>>> <head>
>>> </head>
>>>
>>> <body>
>>> <%=WeekDayName(Weekday(Today))%>
>>> </body>
>>>
>>> </html>
>>> -------------------------------------------------------------
>>>
>>> Returns "tomorrows day" on my server, every time.  Today it shows 
>>> Tuesday.
>>> If I change the date on my server clock to Tuesday 22nd November 2005,
>> this
>>> script will return a "Wednesday" - it is always out by a day.
>>>
>>> I can obviously use this to fix temporarily:
>>> <%=WeekDayName(Weekday(Today)-1)%>
>>>
>>> But, I would love to figure out the problem.
>>>
>>> Any ideas?
>>>
>>> Regards,
>>>
>>> Gary.
>>>
>>>
>>>
>>
>>
>
>
date: Wed, 23 Nov 2005 10:33:17 -0000   author:   Martin Walke martin.walke_no_spam@vega_dot_co_dot_uk

Re: Help ma boab - ah jist canny dae it.   
Martin Walke wrote:
> There isn't such a function as Today?

The VB.Net language does have a Today property (note the Language="VB" in 
the original post, not Language="VBScript").

>
>  wrote in message
> news:dltp60$c5l$1$8302bc10@news.demon.co.uk...
>> Good man, thanks very much.  What causes the problem?
>>
>> Regards.
>>
>> Gary.
>>
>>
>>
>>
>> "Steven Burn" <somewhere@in-time.invalid> wrote in message
>> news:%23sMsdds7FHA.3660@TK2MSFTNGP09.phx.gbl...
>>> Your lucky ..... using Today returns Saturday here, using Now
>>> instead, returns Monday ;o)
>>>
>>> http://mysteryfcm.plus.com/misc/pgweekday.asp
>>>
>>> Using Today: <%=WeekDayName(Weekday(Today))%><br>
>>> Using Now: <%=WeekDayName(Weekday(Now))%><br>
>>>
>>> --
>>> Regards
>>>
>>> Steven Burn
>>> Ur I.T. Mate Group
>>> www.it-mate.co.uk
>>>
>>> Keeping it FREE!
>>>
>>>  wrote in message
>>> news:dlssda$l5q$1$8300dec7@news.demon.co.uk...
>>>> This is crazy,
>>>>
>>>> The following page:
>>>>
>>>> -------------------------------------------------------------
>>>> <%@ Page Language="VB" Debug="true" %>
>>>> <html>
>>>> <head>
>>>> </head>
>>>>
>>>> <body>
>>>> <%=WeekDayName(Weekday(Today))%>
>>>> </body>
>>>>
>>>> </html>
>>>> -------------------------------------------------------------
>>>>
>>>> Returns "tomorrows day" on my server, every time.  Today it shows
>>>> Tuesday.
>>>> If I change the date on my server clock to Tuesday 22nd November
>>>> 2005, this script will return a "Wednesday" - it is always out by
>>>> a day. I can obviously use this to fix temporarily:
>>>> <%=WeekDayName(Weekday(Today)-1)%>
>>>>
>>>> But, I would love to figure out the problem.
>>>>
>>>> Any ideas?
>>>>
>>>> Regards,
>>>>
>>>> Gary.

-- 
Michael Harris
Microsoft MVP Scripting
date: Wed, 23 Nov 2005 15:17:37 -0800   author:   Michael Harris \(MVP\) mikhar at mvps dot org

Re: Help ma boab - ah jist canny dae it.   
Aha! Thanks Michael. Still resisting the foray into .NET  so didn't realise. 
:)) So the question still stands...


"Michael Harris (MVP)" <mikhar at mvps dot org> wrote in message 
news:eTXubRI8FHA.1028@TK2MSFTNGP11.phx.gbl...
> Martin Walke wrote:
>> There isn't such a function as Today?
>
> The VB.Net language does have a Today property (note the Language="VB" in 
> the original post, not Language="VBScript").
>
>>
>>  wrote in message
>> news:dltp60$c5l$1$8302bc10@news.demon.co.uk...
>>> Good man, thanks very much.  What causes the problem?
>>>
>>> Regards.
>>>
>>> Gary.
>>>
>>>
>>>
>>>
>>> "Steven Burn" <somewhere@in-time.invalid> wrote in message
>>> news:%23sMsdds7FHA.3660@TK2MSFTNGP09.phx.gbl...
>>>> Your lucky ..... using Today returns Saturday here, using Now
>>>> instead, returns Monday ;o)
>>>>
>>>> http://mysteryfcm.plus.com/misc/pgweekday.asp
>>>>
>>>> Using Today: <%=WeekDayName(Weekday(Today))%><br>
>>>> Using Now: <%=WeekDayName(Weekday(Now))%><br>
>>>>
>>>> --
>>>> Regards
>>>>
>>>> Steven Burn
>>>> Ur I.T. Mate Group
>>>> www.it-mate.co.uk
>>>>
>>>> Keeping it FREE!
>>>>
>>>>  wrote in message
>>>> news:dlssda$l5q$1$8300dec7@news.demon.co.uk...
>>>>> This is crazy,
>>>>>
>>>>> The following page:
>>>>>
>>>>> -------------------------------------------------------------
>>>>> <%@ Page Language="VB" Debug="true" %>
>>>>> <html>
>>>>> <head>
>>>>> </head>
>>>>>
>>>>> <body>
>>>>> <%=WeekDayName(Weekday(Today))%>
>>>>> </body>
>>>>>
>>>>> </html>
>>>>> -------------------------------------------------------------
>>>>>
>>>>> Returns "tomorrows day" on my server, every time.  Today it shows
>>>>> Tuesday.
>>>>> If I change the date on my server clock to Tuesday 22nd November
>>>>> 2005, this script will return a "Wednesday" - it is always out by
>>>>> a day. I can obviously use this to fix temporarily:
>>>>> <%=WeekDayName(Weekday(Today)-1)%>
>>>>>
>>>>> But, I would love to figure out the problem.
>>>>>
>>>>> Any ideas?
>>>>>
>>>>> Regards,
>>>>>
>>>>> Gary.
>
> -- 
> Michael Harris
> Microsoft MVP Scripting
>
>
>
>
date: Thu, 24 Nov 2005 11:26:39 -0000   author:   Martin Walke martin.walke_no_spam@vega_dot_co_dot_uk

Re: Help ma boab - ah jist canny dae it.   
Didn't realise myself either as I have thankfully thus far, managed to stop
myself so much as contemplating going to .Net (would rather be castrated ...
:o\).

As to what actually causes the differential, I'm not quite sure to be
honest. "Today" is not a valid function, property or method in VBScript
(TMK), so I would have actually expected it to throw up a TypeMismatch or
Undefined Var ... error, rather than going through and trying to figure it
out itself (if it helps any, it actually *does* throw up an undefined var
error if you are using Option Explicit).

--
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

"Martin Walke" <martin.walke_no_spam@vega_dot_co_dot_uk> wrote in message
news:OK1qWoO8FHA.2132@TK2MSFTNGP10.phx.gbl...
> Aha! Thanks Michael. Still resisting the foray into .NET  so didn't
realise.
> :)) So the question still stands...
>
>
> "Michael Harris (MVP)" <mikhar at mvps dot org> wrote in message
> news:eTXubRI8FHA.1028@TK2MSFTNGP11.phx.gbl...
> > Martin Walke wrote:
> >> There isn't such a function as Today?
> >
> > The VB.Net language does have a Today property (note the Language="VB"
in
> > the original post, not Language="VBScript").
> >
> >>
> >>  wrote in message
> >> news:dltp60$c5l$1$8302bc10@news.demon.co.uk...
> >>> Good man, thanks very much.  What causes the problem?
> >>>
> >>> Regards.
> >>>
> >>> Gary.
> >>>
> >>>
> >>>
> >>>
> >>> "Steven Burn" <somewhere@in-time.invalid> wrote in message
> >>> news:%23sMsdds7FHA.3660@TK2MSFTNGP09.phx.gbl...
> >>>> Your lucky ..... using Today returns Saturday here, using Now
> >>>> instead, returns Monday ;o)
> >>>>
> >>>> http://mysteryfcm.plus.com/misc/pgweekday.asp
> >>>>
> >>>> Using Today: <%=WeekDayName(Weekday(Today))%><br>
> >>>> Using Now: <%=WeekDayName(Weekday(Now))%><br>
> >>>>
> >>>> --
> >>>> Regards
> >>>>
> >>>> Steven Burn
> >>>> Ur I.T. Mate Group
> >>>> www.it-mate.co.uk
> >>>>
> >>>> Keeping it FREE!
> >>>>
> >>>>  wrote in message
> >>>> news:dlssda$l5q$1$8300dec7@news.demon.co.uk...
> >>>>> This is crazy,
> >>>>>
> >>>>> The following page:
> >>>>>
> >>>>> -------------------------------------------------------------
> >>>>> <%@ Page Language="VB" Debug="true" %>
> >>>>> <html>
> >>>>> <head>
> >>>>> </head>
> >>>>>
> >>>>> <body>
> >>>>> <%=WeekDayName(Weekday(Today))%>
> >>>>> </body>
> >>>>>
> >>>>> </html>
> >>>>> -------------------------------------------------------------
> >>>>>
> >>>>> Returns "tomorrows day" on my server, every time.  Today it shows
> >>>>> Tuesday.
> >>>>> If I change the date on my server clock to Tuesday 22nd November
> >>>>> 2005, this script will return a "Wednesday" - it is always out by
> >>>>> a day. I can obviously use this to fix temporarily:
> >>>>> <%=WeekDayName(Weekday(Today)-1)%>
> >>>>>
> >>>>> But, I would love to figure out the problem.
> >>>>>
> >>>>> Any ideas?
> >>>>>
> >>>>> Regards,
> >>>>>
> >>>>> Gary.
> >
> > --
> > Michael Harris
> > Microsoft MVP Scripting
> >
> >
> >
> >
>
>
date: Thu, 24 Nov 2005 12:03:25 -0000   author:   Steven Burn lid

Re: Help ma boab - ah jist canny dae it.   
Part of the problem is that you are asking a VB.Net question in a vbscript 
newsgroup. The VB.Net newsgroups will have either "dotnet", "vbnet", or both 
in their names.

Your answer probably has to do with the FirstDayOfWeek property in your 
server's regional settings. The WeekDay function uses FirstDayOfWeek.Sunday 
as the default. The WeekDayName function uses FirstDayOfWeek.System as the 
default. When those two are out of sync, confusion results

Take control of it in your calls to WeekDay() and WeekdayName():

<%=WeekDayName(Weekday(Today,FirstDayOfWeek.Sunday),FirstDayOfWeek.Sunday)%>


webteam@spamtrap.com wrote:
> Good man, thanks very much.  What causes the problem?
>
> Regards.
>
> Gary.
>
>
>
>
> "Steven Burn" <somewhere@in-time.invalid> wrote in message
> news:%23sMsdds7FHA.3660@TK2MSFTNGP09.phx.gbl...
>> Your lucky ..... using Today returns Saturday here, using Now
>> instead, returns Monday ;o)
>>
>> http://mysteryfcm.plus.com/misc/pgweekday.asp
>>
>> Using Today: <%=WeekDayName(Weekday(Today))%><br>
>> Using Now: <%=WeekDayName(Weekday(Now))%><br>
>>
>> --
>> Regards
>>
>> Steven Burn
>> Ur I.T. Mate Group
>> www.it-mate.co.uk
>>
>> Keeping it FREE!
>>
>>  wrote in message
>> news:dlssda$l5q$1$8300dec7@news.demon.co.uk...
>>> This is crazy,
>>>
>>> The following page:
>>>
>>> -------------------------------------------------------------
>>> <%@ Page Language="VB" Debug="true" %>
>>> <html>
>>> <head>
>>> </head>
>>>
>>> <body>
>>> <%=WeekDayName(Weekday(Today))%>
>>> </body>
>>>
>>> </html>
>>> -------------------------------------------------------------
>>>
>>> Returns "tomorrows day" on my server, every time.  Today it shows
>>> Tuesday.
>>> If I change the date on my server clock to Tuesday 22nd November
>>> 2005, this script will return a "Wednesday" - it is always out by a
>>> day. I can obviously use this to fix temporarily:
>>> <%=WeekDayName(Weekday(Today)-1)%>
>>>
>>> But, I would love to figure out the problem.
>>>
>>> Any ideas?
>>>
>>> Regards,
>>>
>>> Gary.

-- 
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
date: Thu, 24 Nov 2005 08:23:20 -0500   author:   Bob Barrows [MVP] com

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us