Query to find out if Last_Update is less than three months from 8/10/2012.

Posted on 2012-09-07
Last Modified: 2012-09-07
I need a query to find out if Last_Update is less than three months from 8/10/2012.
Thank you.
Question by:donnie91910
    LVL 47

    Assisted Solution

    by:Dale Fye (Access MVP)
    in which direction?

    SELECT * from yourTable WHERE [Last_Update] <= DateAdd("m", 3, #8/12/12)
    LVL 30

    Accepted Solution

    SELECT * from tbl WHERE [Last_Update] < DateAdd("m", -3, #08/12/2012# )
    LVL 35

    Expert Comment

    fyed, it will be more than 3 month. You nedd to use -3 and not 3
    LVL 47

    Expert Comment

    by:Dale Fye (Access MVP)
    Well, that actually depends on what the OP means by "less than three months from 8/10/2012"

    It could mean > #5/10/12#, < #5/10/12#, or maybe < #11/10/12#,
    but most likely not > #11/10/12#

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    'Between' is such a common word we rarely think about it but in SQL it has a very specific definition we should be aware of. While most database vendors will have their own unique phrases to describe it (see references at end) the concept in common …
    Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
    What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
    In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

    758 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now