Hello all, thanks for reading my post. I am using the following to get minutes into hours and minutes.
ItemTemplate
<%#Format((CLng(DataBinder.Eval(Container.DataItem, hours) - (CLng(DataBinder.Eval(Container.DataItem, "hours")) Mod 60)) / 60, "0")
%>
:
<%# Format(CLng(DataBinder.Eval(Container.DataItem, "hours")) Mod 60, "00")%>
</ItemTemplate>
</asp:TemplateField></pre>
Works great unless one of the values is Null, then it throws an error DBNull cannot be converted to Long. How can I put a condition in so if hours is null, don't do anything?
Thanks in advance
D-Bar