There is a way in order to set the system date setting (Control
Panel/International settings) from "gg/MM/aa" to "gg/MM/aaaa" via vbs file?
Thanks
Sandro

Re: date settings by Dr

Dr
Tue Dec 30 16:44:50 CST 2003

JRS: In article <l9fIb.220851$e6.8624461@twister2.libero.it>, seen in
news:microsoft.public.scripting.vbscript, Sandrobi
<sandbizzXXX@libero.it> posted at Tue, 30 Dec 2003 13:34:09 :-

>There is a way in order to set the system date setting (Control
>Panel/International settings) from "gg/MM/aa" to "gg/MM/aaaa" via vbs file?

Far better to use AAAA/MM/GG - EN 28601:1992 and any successors ought to
be Italian national standards.

It should be perfectly possible, however, to read and write gg/MM/aaaa
using only location-independent primitives; see below.

--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4 ©
<URL:http://jibbering.com/faq/> Jim Ley's FAQ for news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/vb-dates.htm> VB dates.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.

Re: date settings by Sandrobi

Sandrobi
Wed Dec 31 09:11:47 CST 2003


"Dr John Stockton" <spam@merlyn.demon.co.uk> ha scritto nel messaggio
news:7G+S9RDi$f8$Ewy0@merlyn.demon.co.uk...
> JRS: In article <l9fIb.220851$e6.8624461@twister2.libero.it>, seen in
> news:microsoft.public.scripting.vbscript, Sandrobi
> <sandbizzXXX@libero.it> posted at Tue, 30 Dec 2003 13:34:09 :-
>
> >There is a way in order to set the system date setting (Control
> >Panel/International settings) from "gg/MM/aa" to "gg/MM/aaaa" via vbs
file?
>
> Far better to use AAAA/MM/GG - EN 28601:1992 and any successors ought to
> be Italian national standards.
>
> It should be perfectly possible, however, to read and write gg/MM/aaaa
> using only location-independent primitives; see below.
>
> --
> © John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE
4 ©
> <URL:http://jibbering.com/faq/> Jim Ley's FAQ for
news:comp.lang.javascript
> <URL:http://www.merlyn.demon.co.uk/vb-dates.htm> VB dates.
> <URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items,
links

Very interesting., but I need a way to change and save the international
(i.e. default) settings via vbscript code.
Bye



Re: date settings by Al

Al
Wed Dec 31 11:18:01 CST 2003


"Sandrobi" <sandbizzXXX@libero.it> wrote in message
news:TGBIb.218736$vO5.8954076@twister1.libero.it...
>
> "Dr John Stockton" <spam@merlyn.demon.co.uk> ha scritto nel messaggio
> news:7G+S9RDi$f8$Ewy0@merlyn.demon.co.uk...
> > JRS: In article <l9fIb.220851$e6.8624461@twister2.libero.it>, seen in
> > news:microsoft.public.scripting.vbscript, Sandrobi
> > <sandbizzXXX@libero.it> posted at Tue, 30 Dec 2003 13:34:09 :-
> >
> > >There is a way in order to set the system date setting (Control
> > >Panel/International settings) from "gg/MM/aa" to "gg/MM/aaaa" via vbs
> file?
> >
> > Far better to use AAAA/MM/GG - EN 28601:1992 and any successors ought to
> > be Italian national standards.

I believe that "-" is preferred over "/" as a date field delimiter in the
ISO standard. Better from our point of view as well, as that allows a date
to be used as a file or foldername without further edits.

/Al

> > It should be perfectly possible, however, to read and write gg/MM/aaaa
> > using only location-independent primitives; see below.
> >
> > --
> > © John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00
IE
> 4 ©
> > <URL:http://jibbering.com/faq/> Jim Ley's FAQ for
> news:comp.lang.javascript
> > <URL:http://www.merlyn.demon.co.uk/vb-dates.htm> VB dates.
> > <URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items,
> links
>
> Very interesting., but I need a way to change and save the international
> (i.e. default) settings via vbscript code.
> Bye
>
>



Re: date settings by Dr

Dr
Wed Dec 31 17:21:05 CST 2003

JRS: In article <OMhlOI8zDHA.1576@TK2MSFTNGP11.phx.gbl>, seen in
news:microsoft.public.scripting.vbscript, Al Dunbar [MS-MVP] <alan-no-
drub-spam@hotmail.com> posted at Wed, 31 Dec 2003 10:18:01 :-
>> "Dr John Stockton" <spam@merlyn.demon.co.uk> ha scritto nel messaggio
>> news:7G+S9RDi$f8$Ewy0@merlyn.demon.co.uk...

>> > Far better to use AAAA/MM/GG - EN 28601:1992 and any successors ought to
>> > be Italian national standards.
>
>I believe that "-" is preferred over "/" as a date field delimiter in the
>ISO standard. Better from our point of view as well, as that allows a date
>to be used as a file or foldername without further edits.


Unfortunately, more systems recognise "2003/12/31" as a date than
recognise "2003-12-31", which can get considered as 1960. VBscript will
accept it with '-', however, unlike javascript.

But note that I did not write that AAAA/MM/GG is right; only that it is
better.


>> > It shoul

Please trim your quotings.



ISTM possibly permissible for VBscript running in WSH to change OS
settings; but not VBscript running in Web pages.

It would be OK, of course, for a Web page to change its local copy of
the format info; and it is sufficiently easy to ignore that info and use
a programmed format.

--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 MIME. ©
Web <URL:http://www.merlyn.demon.co.uk/> - w. FAQish topics, links, acronyms
PAS EXE etc : <URL:http://www.merlyn.demon.co.uk/programs/> - see 00index.htm
Dates - miscdate.htm moredate.htm js-dates.htm pas-time.htm critdate.htm etc.

Re: date settings by Torgeir

Torgeir
Sat Jan 03 14:14:37 CST 2004

Sandrobi wrote:

> There is a way in order to set the system date setting (Control
> Panel/International settings) from "gg/MM/aa" to "gg/MM/aaaa" via vbs file?

Hi

Under the registry key
HKEY_CURRENT_USER\Control Panel\International

you will find the values

sLongDate
sShortDate


Here is a Google newsgroup search for you containing some examples:

http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&scoring=d&q=International+regwrite+sLongDate+OR+sShortDate+group%3A*.scripting&btnG=Google+Search



After this RegWrite, to see the change without a logoff/logon, you might need
to run the following command (NT4/Win2k/WinXP):

RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters


A VBScript example:

Set oShell = CreateObject("WScript.Shell")

oShell.Run _
"%windir%\System32\RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters", _
1, True


--
torgeir
Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of the 1328 page
Scripting Guide: http://www.microsoft.com/technet/scriptcenter



Re: date settings by Fosco

Fosco
Sun Jan 04 04:55:56 CST 2004

"Sandrobi"

Set shl = CreateObject("Shell.Application")
shl.ControlPanelItem cstr("intl.CPL ,4")
'

InCtrl5, Version 1.0
http://www.pcmag.com/utilities/
http://common.ziffdavisinternet.com/download/0/1027/inctrl5.zip

In un win9x viene inserito :

HKEY_CURRENT_USER\Control Panel\International "sShortDate"
Type: REG_SZ
Data: dd/MM/yyyy


run Notepad >>>>>>> F5

No restart needed
--
Fosco