3
I am developing an ASP.Net MVC project and the Views Index and Listing Views show the date in Year/Month/Day format, but I want them to show in Day/Month/Year format.
What do I do?
3
I am developing an ASP.Net MVC project and the Views Index and Listing Views show the date in Year/Month/Day format, but I want them to show in Day/Month/Year format.
What do I do?
1
Possibly your Windows is in English, which makes the configuration of date formats be in American format.
In the archive Web.config
, add the following:
<configuration>
...
<system.web>
...
<globalization culture="pt-BR" enableClientBasedCulture="false" uiCulture="pt-BR" />
...
</system.web>
...
</configuration>
Browser other questions tagged asp.net-mvc
You are not signed in. Login or sign up in order to post.
Welcome to [pt.so]. A good practice to start a healthy discussion is to do the [tour] if you haven’t already done it, and read the [Ask] guide. Start by following these recommendations, especially knowing what types of questions to ask, how to create a minimal example that is complete and verifiable, and even what to do when someone answers you.
– Woss
If you can put the code?
– novic
@Html.Raw(Datetime.now(). toString("dd/MM/yyyy")) ?
– Aline
Possible duplicate: Format date and time and list according to current date
– Jéf Bueno
Possible duplicate: Datetime field view in View without part of Hours
– Jéf Bueno
Possible duplicate: Data Displayfor display formatting
– Jéf Bueno