Click here to Skip to main content
15,891,316 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi,

For my ASP.Net web application, while i run using "Visual Studio" it displays date format like 'dd/MM/yyyy'(Which i need)

But after configuring it in IIS it displays date like 'dd-MM-yyyy'(which i don't need)


How to set these datatime format globally for my asp.net application ??

Even i tried to use "Global.asax" file inside my application to change "datetime cultureinfo" but no use.

Even i change ControlPanel-->Regional and Language settings. No luck still..


I assigned todays date in my asp.net application as

txt_jobdate.Text = DateTime.Now.ToString("dd/MM/yyyy");

Its works perfect while compile but not after i publish it.
Posted

1 solution

You can set your culture in web.config file.. follow the article.

http://msdn.microsoft.com/en-us/library/bz9tc508.aspx[^]

this article shows a different approch...

http://stackoverflow.com/questions/2468312/setting-a-date-format-in-asp-net-web-config-globalization-tag[^]


mark as answer if solves your problem... :)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900