473,323 Members | 1,550 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,323 software developers and data experts.

Greater than 6 months query

Hello,
I am trying to query for dates that are greater than 6 months from today's date.

This query would also need to be re-usable at a later date.

Can anyone help me please?
May 23 '06 #1
4 5276
Ok, I did more research, and this is what I did

Expr1: DateDiff("m",[DateField],#Today's Date#)

Then filtered the criteria with >=6

If anyone knows of a better method, I am all ears, but I wanted to share what worked for me.

Thank you
May 23 '06 #2
CaptainD
135 100+
You might find
Expand|Select|Wrap|Line Numbers
  1. [DateField] > DateAdd("m", 6, date()) 
  2.  
more accurate
May 23 '06 #3
Hi,

I think all are the same but I wanted to add the below sample

SELECT COUNT(*) FROM Sales WHERE DATEDIFF(m , InsertDate , GETDATE()) > 6
May 25 '06 #4
CaptainD
135 100+
I assumed you wanted 6 months in the future from now which is what I gave you, Eralper's method will give you, both directions and will round to the month.
May 26 '06 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Tencip | last post by:
Hi everyone, I'm trying to build a simple script that does the following. It should find today's month and year, and then go into a DB query string and look for all records that are from this...
2
by: Chris Becker | last post by:
I have the following query: SELECT Month, Sum(Hits) AS Hits FROM tblHits GROUP BY Month ORDER BY Month Unfortunately it only returns rows for months that have data assigned to them. How...
2
by: Mary | last post by:
I am trying to develop a query which will determine the average costs using a rolling average of the past 12 months of data. In other words, if I entered the Ship Month of January and the Ship...
3
by: jr | last post by:
A perplexing one this. I Am trying to design a query or series of queries which will firstly identify a condition. If column A value is less than column B value make column C value =1 , else...
6
by: carl.barrett | last post by:
Hi, I have a continuous form based on a query ( I will also be creating a report based on the same query). There are 2 fields: Date Obtained and Date Of Expiry I want a further 3 columns...
2
by: bufbec | last post by:
I have worked on this for hours and can't come up with a solution. Hope someone can help me. I have a table called TMBS_HMAUDIT_PARMS. this table contains data to tell me how often a person is...
3
by: Stephen Chaplin | last post by:
I'm summing up time spent on jobs over a week, some of these jobs last greater than 24 hours and when access sums these up it appears that it starts again at 00:00 once it gets past 23:59. Is it...
4
by: MCLR | last post by:
Good day to all: I found your website a couple of days ago as I was searching for resources that can help within my particular problem in writing a script for an Access Query. The issue is to...
6
by: Acrobatic | last post by:
Hello, I know this will be an easy fix--but as of now I'm banging my head against the wall. I need a fresh perspective from the group to see what my problem is: This is a simple accounting...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.