MVC displays month and date ago

I am trying to show the date as dd / MM / yyyy, but it continues to appear as MM / dd / yyyy in the view.

Model:

[DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "{0:dd/MM/yyyy}")]
[Required]
public DateTime? HireDate { get; set; }

View:

@Html.DisplayFor(modelItem => item.HireDate)
+4
source share
1 answer

As a solution to this OP problem:

What did you set in the control panel → Region and language → Formats → Short date?

+1
source

All Articles