Handling a string in the view - asp.net MVC

0

I have a public string TimeUpdate { get; set; } in my model that is of the form "13-12-2016 17:12:09" . I need that in the view it only appears the hours and the minutes, how I can do the treatment of the field?

PS: I've tried [DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "{0:t}")] but with no success. Thank you in advance.

    
asked by anonymous 13.12.2016 / 20:21

0 answers