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 7447523
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T12:37:39+00:00 2026-05-29T12:37:39+00:00

I am Working On ASP.NET_C# Application I am pulling out some Dates form SQL

  • 0

I am Working On ASP.NET_C# Application

I am pulling out some Dates form SQL on a Grid View.

But instead of those Dates, I like to see how mush “Plus +” or “minus –“ It is form Today’s Date.

For Example

Today’s Date is = 11/02/2012

If the Date from SQL is 07/02/2012, I like my Grid to show -4

Or

If the Date from SQL is 17/02/2012, I like my Grid to show +6

Please Help me, How do I go about doing that….

This is My SQL Query; That I am working With

SELECT MAX(AmountPay.DateUpto) AS [ PaidUpTo], TimeTable.Name, TimeTable.Ref, TimeTable.Time11to12 FROM AmountPay FULL OUTER JOIN TimeTable ON AmountPay.Ref = TimeTable.Ref WHERE (TimeTable.Time11to12 = @Time11to12) GROUP BY TimeTable.Name, TimeTable.Ref, TimeTable.Time11to12

AmountPay.DateUpto is the Date I Like see as + or –

I have Been Suggested Datediff Function; and I have Used datediff function for working out things like Age from Date of Birth but I can’t work out; how I can use this in the Case
Thanks in Advance

  • 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-05-29T12:37:44+00:00Added an answer on May 29, 2026 at 12:37 pm
    SELECT DATEDIFF(day,GetDate(), MAX(AmountPay.DateUpto)) AS [ PaidUpTo], TimeTable.Name, TimeTable.Ref, TimeTable.Time11to12 FROM AmountPay FULL OUTER JOIN TimeTable ON AmountPay.Ref = TimeTable.Ref WHERE (TimeTable.Time11to12 = @Time11to12) GROUP BY TimeTable.Name, TimeTable.Ref, TimeTable.Time11to12
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on a ASP.net application written in C# with Sql Server 2000
I working on an application on ASP.NET C# I want to view all the
I just started working on an asp.net / C#.net application that is going to
I'm working on a web application (with ASP.NET 2.0 (C#) and jQuery) In my
I am working on asp.net, C# web application. Working on my main page in
I'm working on an ASP.NET4.0/C# application for a public site that needs to authenticate
I am currently working on an ASP.NET 3.5 and C# web application which deals
I am currently working on an ASP.NET 3.5 and C# web application which deals
I've been working on a C# ASP.Net application that requires images to be customized
I am working on an ASP.NET/C# Application. I have Link buttons like this <asp:LinkButton

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.