How to Display Time(7) in Razor View Netcore?

Viewed 27

I have a view to display a field time(7) in SQL Database to User:

The values in the database are like this:

And I just want to display the time in format hh:mm only.

How can I do this?

I have tried but it failed:

@item.TimeMatch.ToString("hh:mm")
1 Answers

Yes I found the solution @item.TimeMatch.ToString(@"hh:mm")

Related