Convert TimeSpan.TotalMilliseconds to datetime and format it as hour:minute
问题 I kinda confuse about the date time conversion in my model i have defined public DateTime? Sent { get; set; } public DateTime? Reply { get; set; } public double ResponseTime { get; set; } in linq part i am using ResponseTime = (u.Reply - u.sent).TotalMilliseconds which is not formated and displayed like this 979809803 I want to know how do i convert it to datetime format, and eventually will display the format as hour:minute, for instance 2:45 between the date sent and date reply. 回答1: