I have problem in regarding with converting the datetime to date using a model.
Model from Class Library
public partial class LoanCo
For those who get here wanting to change date format of a model in the view regardless of Model class (Its what I expected to be answering). This works in both Razorpages and MVC.
Just add .ToString("dd/MM/YYYY") to the property you're displaying.
e.g.
@Model.DateOfBirth.ToString("
This is great if you only want to show part of a date say month and year, but elsewhere you need to show the day and the time.