I am working on asp.net mvc2 application. Problem is that when i am displaying date in format MM/dd/yyyy
application work, but i must display the date in format dd/MM/yyyy
to user. I set date in this format, but then i have problem with web service because it expect date format in MM/dd/yyyy
, and i always get an error.
First i thought to write simple method that would convert date from one format to another ,and display in dd/MM/yyyy
. But i have to match methods that use date, and i will have to make changes at many places.
I tried to use globalization in web config file like
<system.web>
<globalization
requestEncoding="utf-8"
responseEncoding="utf-8"
culture="en-GB"
uiCulture="en-GB"
/>
</system.web>
But that did not work for me. Is there some way to change date format when i display to the user, and then web service can accept it?
Thanks