forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


@DATETIME() bug for Windows 7 Professional only

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Bug Reports
View previous topic :: View next topic  
Author Message
arcray
Valued Contributor
Valued Contributor


Joined: 13 Jul 2001
Posts: 242
Location: Aude, France

PostPosted: Fri Feb 05, 2010 1:29 pm    Post subject: @DATETIME() bug for Windows 7 Professional only Reply with quote

My macros depend on a lot of date arithmetic, and I use DATETIME() extensively. However I have had several reports from users that Windows 7 Professional is giving erroneous dates. i.e.

All of my clients have correctly set up the UK as their locale, and ensured that "dd/mm/yyyy" is the Short Date form


Today is the fifth of Feb 2010, so

Code:

%%Day = 5
%%Month = 02
%%Year = 2010

%%RDate = @DATETIME(,%%Day/%%Month/%%Year)
%%QDate = @NAME(@DATETIME())


should both evaluate to 40214, BUT %QDate is correct and RDate = 40300 (which is 02/05/2010 in UK format).

Either there is a setting within Windows 7 Professional, that needs amending to a UK locale, or something else...

Not sure what is going on, but it is perplexing me.

Does anyone here have Win7 Pro, and could they test it for me?

Thanks in advance

_________________
Andrew GRAY
If you don't know I am looking for work, I won't get the job.

andrewrcgray.com
Back to top
View user's profile Send private message Send e-mail
arcray
Valued Contributor
Valued Contributor


Joined: 13 Jul 2001
Posts: 242
Location: Aude, France

PostPosted: Fri Feb 05, 2010 2:47 pm    Post subject: Reply with quote

The solution seems to be adding the following line to the top of all my scripts...

Code:

OPTION DATEFORMAT,"dd/mm/yyyy"


Which will be a right pain, since there are 100's of them out there...

_________________
Andrew GRAY
If you don't know I am looking for work, I won't get the job.

andrewrcgray.com
Back to top
View user's profile Send private message Send e-mail
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2146
Location: A House

PostPosted: Fri Feb 05, 2010 4:22 pm    Post subject: Reply with quote

Did you still need anyone to test?
_________________
'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.)
Necroprogramming FTW! - "Wait.. Is necroprogramming legal?"
http://www.freewarehome.com <-- Freeware listings since 1996
Back to top
View user's profile Send private message
arcray
Valued Contributor
Valued Contributor


Joined: 13 Jul 2001
Posts: 242
Location: Aude, France

PostPosted: Fri Feb 05, 2010 11:51 pm    Post subject: Reply with quote

Hi Garrett

No, that's fine. It seems odd that it only affects Windows 7 Professional, and not Ultimate or Enterprise. Have not tried Home. Nor the 64-bit flavours.

But now I have the solution, I'll live with the anomaly.

Best Regards

_________________
Andrew GRAY
If you don't know I am looking for work, I won't get the job.

andrewrcgray.com
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Bug Reports All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum




Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group