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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T00:29:35+00:00 2026-06-14T00:29:35+00:00

I am working on a telerik gridview and I supposed to display a warning

  • 0

I am working on a telerik gridview and I supposed to display a warning on certain conditions and 1 of them is that:

if the due date is bigger than today’s date and also the warning days are 3, then it will show all the records who’s due date is bigger than today but only if they come with in warning period then it supposed to show.

so if today’s date is 22-12-2012 and due date is 25-12-2012 and warn days are 3 then it should select that record

what I tried so far:

 DateTime dtTodayDate = DateTime.Today;
   string strTodayDate = dtTodayDate.ToString("yyyy/MM/dd 00:00:00");
    strFilter += @"OR ( [DueDate] >= #" + strTodayDate + @"# AND [Warn_Days] > 0 AND [DueDate] - [Warn_Days] =#" + strTodayDate + @"# )";

Cannot perform ‘-‘ operation on System.DateTime and System.Int32.

  • 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-14T00:29:36+00:00Added an answer on June 14, 2026 at 12:29 am

    You are using the wrong delimiter, # is used by Access. For SQL Server, just pass your dates as regular strings:

    strFilter += @"OR ( [DueDate] >= '" + strTodayDate + @"' AND [Warn_Days] > 0 AND [DueDate] - [Warn_Days] ='" + strTodayDate + @"' )";
    

    But, you should be using parameterized queries instead—there is a good chance you will pass an ambiguous string at some point and not get the date value you think you are getting.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Apparently some vendors (like Telerik) are working on versions of their controls that do
I'm working with an alert window (Telerik WPF) that is normally displayed asynchronously (
I have a project I'm working on and I'm using the Telerik MVC controls.
Working with an undisclosed API, I found a function that can set the number
Working with developer phone earlier, today i tried my hand on emulator i do
I'm working with Telerik's MVC Tabstrip control and am having an issue, although I
I am working with the telerik reporting platform. I am trying to create a
Personally I've been working for years with Telerik's RadControls and DevExpress ASP.NET controls. IMHO
Telerik RadGrid ExportToCSV was used in my RadGrid, but it's not working in Chrome,
I'm working with Telerik RadScheduleView and have implemented the IAppointment class into a child

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.