Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8590959
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T23:24:56+00:00 2026-06-11T23:24:56+00:00

I have a query to display DATEDIFF of Task Completed date & Task DeadLine.

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T23:24:57+00:00Added an answer on June 11, 2026 at 11:24 pm
    select memname, 
        (case when  DATEDIFF(d,CompleteDate,FreeTrialTaskMst.Enddate) >0 then 'completed'
    else 'Not Complete' end) as  DeadLine
      from member
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this query return plannerDb.IndividualCalendars.Where(u => u.UserId == userId && u.StartDate.Date >= startDate
I have a database from which I want to query and display only that
I have this query to display records based on date Select * From orders
I have a query like this where I want to display sorted records in
I have a table from which I query data to display resultset using stored
I have a simple query: $query = new WP_Query('showposts=5'); that will obviously display 5
I have a script which allows to display search results. Given a query there
I have query to show the table like this: but I want to PIVOT
I have this query that should display all posts related to a specific tag
I have a query that selects some fields to display from a table SELECT

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.