By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,852 Members | 2,123 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,852 IT Pros & Developers. It's quick & easy.

Q : Problem With Date Time Display Format

P: n/a
Hello guys, got a little question regarding the regional language settings .

Anyway I got a Windows 2003 Server machine that was installed with the date
format "dd/MM/yyyy" and location still locked in US.

As we migrated certain apps over to the new machine. we found out
something... someone coded a Now.ToString in a database query... and the SQL
Box is running MM/dd/yyyy! Chaos follows!!!

I tried setting the Administrator account's date format back to MM/dd/yyyy
under regional and language settings.
I tried logging onto ASPNet user's account and setting the date format to
MM/dd/yyyy but I still can't get Now.ToString to return in an "MM/dd/yyyy
hh:mm tt"

can anyone tell me where I should set the setting?

Thanks!
Nov 18 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Marauderz,

When someone is browsing your application anonymously, there is no
authenticated user. Therefore, there is no profile associated with the
process user at that point. The locale settings in those situations are
read from the .DEFAULT profile on the machine.

You can change the settings for the .DEFAULT profile, but you have to do it
via the Registry.

1) Add the following registry keys with a value of 2
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\OLEAUT
VarConversionLocaleSetting = 2 (DWORD)
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Servic es\InetInfo\Parameters
SetVarConversionLocaleSetting = 2 (DWORD)
2) Make any changes that you would like your web application to use in
your
regional options(locale, short date, etc)
3) Open Regedit and navigate to HKEY_CURRENT_USER\Control
Panel\International
4) Export this key to a file named currentuser.
5) navigate to HKEY_USERS\.DEFAULT\Control Panel\International
6) Export this key to a file named default
7) Open default.reg and currentuser.reg in notepad.
8) Copy the header from the default.reg and paste it over the header in
currentuser.
example:
Default Currentuser
before
[HKEY_USERS\.DEFAULT\Control Panel\International]
[HKEY_CURRENT_USER\Control Panel\International]
after
[HKEY_USERS\.DEFAULT\Control Panel\International]
[HKEY_USERS\.DEFAULT\Control Panel\International]
9) Save default.reg.
10) Merge it into the registry.
11) Restart IIS.

This should ensure that the date formats are pulled from the .DEFAULT
profile always. You can change these values in the future by following
these steps.

Jim Cheshire [MSFT]
MCP+I, MCSE, MCSD, MCDBA
Microsoft Developer Support
ja******@online.microsoft.com

This post is provided "AS-IS" with no warranties and confers no rights.
--------------------
From: "Marauderz" <ma*******@marauderzTHROWAWAYstuff.com.invalid>
Subject: Q : Problem With Date Time Display Format
Date: Mon, 19 Jul 2004 09:36:10 +0800
Lines: 20
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
Message-ID: <#Q**************@tk2msftngp13.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.aspnet
NNTP-Posting-Host: 210.187.6.69
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFT NGP08.phx.gbl!tk2msftngp13
.phx.gblXref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:247991
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet

Hello guys, got a little question regarding the regional language settings

Nov 18 '05 #2

P: n/a
Thanks for the suggestion... but it doesn't seem to work...
Any other suggestions, I need a MM/dd/yyyy short date, maybe you could
prepare a reg file for me that does the changes?
Basically I need a US date display.

The programmer that wrote SQL Injectable code is being flogged as I type. ;)

Thanks.

"Jim Cheshire [MSFT]" <ja******@online.microsoft.com> wrote in message
news:3n**************@cpmsftngxa06.phx.gbl...
Marauderz,

When someone is browsing your application anonymously, there is no
authenticated user. Therefore, there is no profile associated with the
process user at that point. The locale settings in those situations are
read from the .DEFAULT profile on the machine.

You can change the settings for the .DEFAULT profile, but you have to do it via the Registry.

1) Add the following registry keys with a value of 2
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\OLEAUT
VarConversionLocaleSetting = 2 (DWORD)
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Servic es\InetInfo\Parameters
SetVarConversionLocaleSetting = 2 (DWORD)
2) Make any changes that you would like your web application to use in
your
regional options(locale, short date, etc)
3) Open Regedit and navigate to HKEY_CURRENT_USER\Control
Panel\International
4) Export this key to a file named currentuser.
5) navigate to HKEY_USERS\.DEFAULT\Control Panel\International
6) Export this key to a file named default
7) Open default.reg and currentuser.reg in notepad.
8) Copy the header from the default.reg and paste it over the header in
currentuser.
example:
Default Currentuser
before
[HKEY_USERS\.DEFAULT\Control Panel\International]
[HKEY_CURRENT_USER\Control Panel\International]
after
[HKEY_USERS\.DEFAULT\Control Panel\International]
[HKEY_USERS\.DEFAULT\Control Panel\International]
9) Save default.reg.
10) Merge it into the registry.
11) Restart IIS.

This should ensure that the date formats are pulled from the .DEFAULT
profile always. You can change these values in the future by following
these steps.

Jim Cheshire [MSFT]
MCP+I, MCSE, MCSD, MCDBA
Microsoft Developer Support
ja******@online.microsoft.com

This post is provided "AS-IS" with no warranties and confers no rights.
--------------------
From: "Marauderz" <ma*******@marauderzTHROWAWAYstuff.com.invalid>
Subject: Q : Problem With Date Time Display Format
Date: Mon, 19 Jul 2004 09:36:10 +0800
Lines: 20
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
Message-ID: <#Q**************@tk2msftngp13.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.aspnet
NNTP-Posting-Host: 210.187.6.69
Path:

cpmsftngxa06.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFT NGP08.phx.gbl!tk2msftngp13 phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:247991X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet

Hello guys, got a little question regarding the regional language

settings

Nov 18 '05 #3

P: n/a
Marauderz,

I don't have a .reg file to send you. You will need to make those
modifications yourself.

You do want to make sure that the Registry keys you create for OLEAUT are
DWORD values.

Jim Cheshire [MSFT]
MCP+I, MCSE, MCSD, MCDBA
Microsoft Developer Support
ja******@online.microsoft.com

This post is provided "AS-IS" with no warranties and confers no rights.

--------------------
From: "Marauderz" <ma*******@marauderzTHROWAWAYstuff.com.invalid>
References: <#Q**************@tk2msftngp13.phx.gbl> <3n**************@cpmsftngxa06.phx.gbl>Subject: Re: Q : Problem With Date Time Display Format
Date: Tue, 20 Jul 2004 02:19:44 +0800
Lines: 87
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
Message-ID: <ek**************@TK2MSFTNGP10.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.aspnet
NNTP-Posting-Host: 219.95.131.217
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP10.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:248183
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet

Thanks for the suggestion... but it doesn't seem to work...
Any other suggestions, I need a MM/dd/yyyy short date, maybe you could
prepare a reg file for me that does the changes?
Basically I need a US date display.

The programmer that wrote SQL Injectable code is being flogged as I type. ;)
Thanks.

"Jim Cheshire [MSFT]" <ja******@online.microsoft.com> wrote in message
news:3n**************@cpmsftngxa06.phx.gbl...
Marauderz,

When someone is browsing your application anonymously, there is no
authenticated user. Therefore, there is no profile associated with the
process user at that point. The locale settings in those situations are
read from the .DEFAULT profile on the machine.

You can change the settings for the .DEFAULT profile, but you have to do

it
via the Registry.

1) Add the following registry keys with a value of 2
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\OLEAUT
VarConversionLocaleSetting = 2 (DWORD)
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Servic es\InetInfo\Parameters
SetVarConversionLocaleSetting = 2 (DWORD)
2) Make any changes that you would like your web application to use in
your
regional options(locale, short date, etc)
3) Open Regedit and navigate to HKEY_CURRENT_USER\Control
Panel\International
4) Export this key to a file named currentuser.
5) navigate to HKEY_USERS\.DEFAULT\Control Panel\International
6) Export this key to a file named default
7) Open default.reg and currentuser.reg in notepad.
8) Copy the header from the default.reg and paste it over the header in
currentuser.
example:
Default Currentuser
before
[HKEY_USERS\.DEFAULT\Control Panel\International]
[HKEY_CURRENT_USER\Control Panel\International]
after
[HKEY_USERS\.DEFAULT\Control Panel\International]
[HKEY_USERS\.DEFAULT\Control Panel\International]
9) Save default.reg.
10) Merge it into the registry.
11) Restart IIS.

This should ensure that the date formats are pulled from the .DEFAULT
profile always. You can change these values in the future by following
these steps.

Jim Cheshire [MSFT]
MCP+I, MCSE, MCSD, MCDBA
Microsoft Developer Support
ja******@online.microsoft.com

This post is provided "AS-IS" with no warranties and confers no rights.
--------------------
>From: "Marauderz" <ma*******@marauderzTHROWAWAYstuff.com.invalid>
>Subject: Q : Problem With Date Time Display Format
>Date: Mon, 19 Jul 2004 09:36:10 +0800
>Lines: 20
>X-Priority: 3
>X-MSMail-Priority: Normal
>X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
>Message-ID: <#Q**************@tk2msftngp13.phx.gbl>
>Newsgroups: microsoft.public.dotnet.framework.aspnet
>NNTP-Posting-Host: 210.187.6.69
>Path:

cpmsftngxa06.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSF TNGP08.phx.gbl!tk2msftngp1

3
phx.gbl
>Xref: cpmsftngxa06.phx.gblmicrosoft.public.dotnet.framework.aspnet:247991 >X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
>
>Hello guys, got a little question regarding the regional language

settings


Nov 18 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.