Windows 2000 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" <JanLisbjerg@discussions.microsoft.com> wrote in message
news:36D099A4-D707-4464-9D67-54AE802E656C@microsoft.com...
> 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