I'm working on my first project in asp.net core razor pages and trying to add a creation date time field to my Article model which is by default filled with current date time. I have defined it liked this:
[Required]
[DataType(DataType.DateTime)]
public DateTime CreationDate { get; set; } = DateTime.Now;
when I visit the Article creation page, it is shown like this:
2019/02/02 09:25:36.377 PM
I don't want the second and millisecond to be shown here, but couldn't find a way to remove them. Any help would be appreciated.