System Account locals

  • Thread starter Thread starter JanLisbjerg
  • Start date Start date
J

JanLisbjerg

Hi

I have a server (Windows 2003) where a scriot is running as the System
Account.
The script uses some date information.
This date information is retrieved as: mm/dd/yyyy (Looks like the US date
format)

I would like to have it as: dd/mm/yyyy (The UK date format)

How can I change the regional options on the System Account ?
I tried changing the administrators regional options, but that did not help
because the script is running as System Account
 
JanLisbjerg said:
Hi

I have a server (Windows 2003) where a scriot is running as the System
Account.
The script uses some date information.
This date information is retrieved as: mm/dd/yyyy (Looks like the US date
format)

I would like to have it as: dd/mm/yyyy (The UK date format)

How can I change the regional options on the System Account ?
I tried changing the administrators regional options, but that did not
help
because the script is running as System Account

Where do you obtain the date information from? Are you
using the %date% variable? Or a system call?

Here are a couple of ways to make your scripts robust and
independent of regional settings:
- Use now.exe in order to obtain the date details. This tool
is included with the Windows Resource Kit.
- Use a VB Script solution such as this one:
D = 1000000 * day(now) + 10000 * month(now) + year(now)
wscript.echo Left(D,2) & "/" & Mid(D,3,2) & "/" & Right(D,4)
 
Back
Top