469,336 Members | 5,987 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,336 developers. It's quick & easy.

ASP.Net not showing Correct System Short Date format ?

I have deployed my ASP.Net Application on Windows Server 2000, Service Pack
4, when I run my Application and shows today's date with
system.date.today.ToShortDateString, it shows in the format m/d/yyyy while
in my Regional Settings, I have defined the format as dd/MM/yyyy.

If I run the same Application on my Laptop with Windows XP Pro, it displays
the correct date format, any idea please ?

Best Regards,

Luqman

Jul 2 '07 #1
3 3014
Hi there,

Server has got different locale setting. You can force ASP.NET worker
process to use different locale by changing <globalizationelement in the
web.config / machine.config file:

<system.web>
.... other settings
<globalization culture="en-GB"/>
.... other settings
</system.web>

hope this helps

--
Milosz
"Luqman" wrote:
I have deployed my ASP.Net Application on Windows Server 2000, Service Pack
4, when I run my Application and shows today's date with
system.date.today.ToShortDateString, it shows in the format m/d/yyyy while
in my Regional Settings, I have defined the format as dd/MM/yyyy.

If I run the same Application on my Laptop with Windows XP Pro, it displays
the correct date format, any idea please ?

Best Regards,

Luqman

Jul 2 '07 #2
An ASPX page runs on the server so it uses the server settings not your
workstation settings.

You could use the globalization section in the web.config file to tell
ASP.NET which country should be used (rather than messing with system wide
server settings. See :
http://msdn2.microsoft.com/en-us/library/hy4kkhe0.aspx
"Luqman" <pe*******@cyber.net.pka écrit dans le message de news:
OL*************@TK2MSFTNGP06.phx.gbl...
>I have deployed my ASP.Net Application on Windows Server 2000, Service Pack
4, when I run my Application and shows today's date with
system.date.today.ToShortDateString, it shows in the format m/d/yyyy while
in my Regional Settings, I have defined the format as dd/MM/yyyy.

If I run the same Application on my Laptop with Windows XP Pro, it
displays
the correct date format, any idea please ?

Best Regards,

Luqman

Jul 2 '07 #3
Hi,
Thanks V.Much, it resolved my problem.

Best Regards,

Luqman
"Milosz Skalecki [MCAD]" <mi*****@DONTLIKESPAMwp.plwrote in message
news:45**********************************@microsof t.com...
Hi there,

Server has got different locale setting. You can force ASP.NET worker
process to use different locale by changing <globalizationelement in the
web.config / machine.config file:

<system.web>
... other settings
<globalization culture="en-GB"/>
... other settings
</system.web>

hope this helps

--
Milosz
"Luqman" wrote:
I have deployed my ASP.Net Application on Windows Server 2000, Service
Pack
4, when I run my Application and shows today's date with
system.date.today.ToShortDateString, it shows in the format m/d/yyyy
while
in my Regional Settings, I have defined the format as dd/MM/yyyy.

If I run the same Application on my Laptop with Windows XP Pro, it
displays
the correct date format, any idea please ?

Best Regards,

Luqman



Jul 3 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by kgatchell2001 | last post: by
5 posts views Thread by Indrani | last post: by
2 posts views Thread by TerryW | last post: by
3 posts views Thread by Matt Brown - identify | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.