I have a query to display DATEDIFF
of Task Completed date & Task DeadLine. I want to display whether the Task is completed in time or not and display result as "Completed in Time" and "Not Completed in Time" depending on the value of date difference.
select memname,
CONVERT(nvarchar, DATEDIFF(d,CompleteDate,FreeTrialTaskMst.Enddate)) AS Difference
from member
Here I get value >= 0
if completed in time and <0 if not completed within time.
Now getting this value I want to bind the text to grid as "Completed in Time" or "Not Completed in Time".
In Grid View:
<asp:TemplateField HeaderText=" DeadLine">
<ItemTemplate>
<asp:Label ID="lblDeadLine" runat="server" Text='<%# (Eval("DeadLine")) %>' ReadOnly="true"></asp:Label>
</ItemTemplate>
</asp:TemplateField>
How to do it?