View previous topic :: View next topic |
Author |
Message |
arcray Valued Contributor
Joined: 13 Jul 2001 Posts: 242 Location: Aude, France
|
Posted: Fri Feb 05, 2010 1:29 pm Post subject: @DATETIME() bug for Windows 7 Professional only |
|
|
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 |
|
|
arcray Valued Contributor
Joined: 13 Jul 2001 Posts: 242 Location: Aude, France
|
Posted: Fri Feb 05, 2010 2:47 pm Post subject: |
|
|
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 |
|
|
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Fri Feb 05, 2010 4:22 pm Post subject: |
|
|
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.) |
|
Back to top |
|
|
arcray Valued Contributor
Joined: 13 Jul 2001 Posts: 242 Location: Aude, France
|
Posted: Fri Feb 05, 2010 11:51 pm Post subject: |
|
|
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 |
|
|
|