I have a problem that I do not know if it has a solution the way I am facing it.
I have a repeater where I binde through <% # Eval ('property')% > properties of an object, which has all of them, DateTime startTime and DateTime EndTime.
What I would like to do is write in the HTML the hours of difference between these 2 properties, for which I thought I would do something like that,
<%TimeSpan diferencia = ((DateTime)Eval("finaliza")) - ((DateTime)Eval("publicada"));%> <%= diferencia.TotalHours %>
which does not work for me and that's why I'm here to find a solution that works. As much as possible through this approach I had, and if it is not possible then I will listen to other options.
Thank you very much.