Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / July 2007

Tip: Looking for answers? Try searching our database.

ASP.Net not showing Correct System Short Date format ?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Luqman - 02 Jul 2007 14:44 GMT
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
Milosz Skalecki [MCAD] - 02 Jul 2007 14:52 GMT
Hi there,

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

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

hope this helps

Signature

Milosz

> 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
[quoted text clipped - 7 lines]
>
> Luqman
luqman - 03 Jul 2007 06:34 GMT
Hi,
Thanks V.Much, it resolved my problem.

Best Regards,

Luqman

> Hi there,
>
[quoted text clipped - 24 lines]
> >
> > Luqman
Patrice - 02 Jul 2007 14:56 GMT
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

>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
[quoted text clipped - 8 lines]
>
> Luqman

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.