/build/static/layout/Breadcrumb_cap_w.png

WSH now function - XP SP2 vs XP SP3

OK, so has anyone else noticed that using the now function under XP SP3 produces the date in American format, whereas SP2 didn't?

All the regional settings in control are set to UK but running "msgbox now" on SP2 produces 04/02/2010 but on SP3 we get 2/4/2010

I did notice that WSH version in SP2 is 5.6 but in SP3 it's 5.7 so I guess it's not picking up the regional settings correctly...

Presumably this will fix it - just going to give it a try but was interested to hear if anyone else had noticed... http://support.microsoft.com/kb/951978

Cheers,
Rob.

0 Comments   [ + ] Show comments

Answers (2)

Posted by: anonymous_9363 14 years ago
Red Belt
0
Yes! I never bothered to check whether it was due to SP3 because I have now left the client where I noticed it and I also routinely convert all dates to either quasi-ISO format (YYYYMMDDHHMMSS) or to WMI format precisely to bypass this sort of nonsense.

EDIT:
Rob, somewhere, I have a function which you can throw Now into and it will return an array with the year, month and so on as elements, using Year(strDate), Month(strDate) and so on. If you want I can see if I can locate it but I'm sure a man of your calibre could knock it up quicker than it'd take me to get it to you.
Posted by: MSIPackager 14 years ago
3rd Degree Black Belt
0
The kind of problems that could be caused by this make me shudder.

Anyways, the patch works (even before the reboot) as does the SetLocale(2057) 'workaround'

Can't wait for PowerShell to become the norm... [;)]
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ