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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T03:07:52+00:00 2026-05-26T03:07:52+00:00

I am creating an MVC app where I need to send out an email

  • 0

I am creating an MVC app where I need to send out an email to all those records whose value (DateUpdated) are not updated in the Customer table.

My Customer table looks like this:

ID (PK)  
Name  
Address  
DateLastUpdated

Now I have this MySql query:

 SELECT * FROM users WHERE DateLastUpdated >= NOW() - INTERVAL 6 MONTH 

How I will write it in T-SQL and perform this task in MVC3? Please help!

  • 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-26T03:07:52+00:00Added an answer on May 26, 2026 at 3:07 am

    Your query should be:

    SELECT * FROM users WHERE DateLastUpdated >= DateAdd(month, -6, getdate())

    Additionally, you may want to strip out the time portion so you are left with just the date e.g. 2011-04-12 00:00:00.000 you can use this:

    SELECT  *  
    FROM    users  
    WHERE   DateLastUpdated >= DateAdd(Month, -6, Cast(Floor(Cast(GetDate() as Float)) as DateTime))
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying out creating Spring MVC app on SpringToolSuite (STS) IDE. I do:
I'm creating an asp.net MVC app, first time I've done this. I have a
I'm writing my first MVC app right now and am creating a new MembershipProvider
I'm writing my first MVC app right now and am creating a new MembershipProvider
In my Spring MVC based web-app, I'm manually creating an Errors/BindingResult object after manually
I'm creating an MVC 3 app that manages business for client companies. When deployed,
I'm creating my first Spring MVC app on Tomcat 6. Certain pages will be
I'm creating a multi-tenant Asp.Net MVC 3 Web app, and using EF4.1 code first
I am creating my very first Rails and MVC app. It is a website
I am creating a code first MVC app with a separate class libraries for

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.