473,396 Members | 1,784 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Q : Problem With Date Time Display Format

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
3 5899
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: wireless200 | last post by:
I've got a table with some datetime fields in it. One field (call it field 1) is of the form mm/dd/yyyy and the other two (fields 2 and 3) are in the form of hh:mm:ss:xx where xx is hundreths of...
3
by: Dustin Wilson | last post by:
I have a problem with the following line of code. rstOutput! = FormatDateTime("January 1, 2004", vbLongDate) When I run this on my computer at home it runs without problem but when I run it at...
12
by: Rob T | last post by:
I'm storing a date/time into a SQL table of type datetime. I need it to be precise so the value is stored to the 1000th of a second. ie "insert into myTable mydate values ('08/05/2005...
3
by: josh3006 | last post by:
Hi there I'm new in DB2, currently i'm into java development The problem that i'm facing is that when i use JSP page to save, the date is correct when i pass(from JSP page) to database, but when i...
6
by: yoshitha | last post by:
hi db : sql server 2000 lan : C#.net(ASp.Net) in my database table there are 2 fileds of data type datatime. in field 1 i'm storing date in field 2 i'm storing time.
0
by: Wayne | last post by:
I am charting data from a query that consists of a Date/Time field and a Number field. The Date/Time field is the x scale on my chart. Sometimes data is collected from different times during the...
12
by: param | last post by:
Hi All, I want to use %x as directive to get the locale specific date representation. But, at the same time, i want to know the format of the output for interpreting it through program. Is there...
10
by: WebCM | last post by:
There is a function: http://paste.ubuntu.com/21865 It needs GMT date in YYYY-MM-DD HH:MM:SS format - in SQL: datetime. If date is the same as today, the function returns "Today". There is one...
5
matheussousuke
by: matheussousuke | last post by:
Hello, I'm using tiny MCE plugin on my oscommerce and it is inserting my website URL when I use insert image function in the emails. The goal is: Make it send the email with the URL...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.