473,480 Members | 1,799 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

DateDiff() Calculation

296 Recognized Expert Contributor
Hi guys. I know I've seen this somewhere, but when I need the answer, I can't seem to find it. This should be relatively simple. I'm trying to add criteria to a query so that it only shows people whose performance review date is within one month. So, it should display all names where [PerformanceReviewDate] is between Today and one month from today. I think I should be using the DateDiff() function, but I've never used it before and am unsure of the syntax. Any guidance would be appreciated. Thanks.
Sep 10 '07 #1
2 1315
FishVal
2,653 Recognized Expert Specialist
Hi guys. I know I've seen this somewhere, but when I need the answer, I can't seem to find it. This should be relatively simple. I'm trying to add criteria to a query so that it only shows people whose performance review date is within one month. So, it should display all names where [PerformanceReviewDate] is between Today and one month from today. I think I should be using the DateDiff() function, but I've never used it before and am unsure of the syntax. Any guidance would be appreciated. Thanks.
Hi, there.

something like this
Expand|Select|Wrap|Line Numbers
  1. SELECT tbl.* FROM tbl WHERE DateDiff("m", Date, tbl.[PerformanceReviewDate])<1;
  2.  
Sep 10 '07 #2
mlcampeau
296 Recognized Expert Contributor
Hi, there.

something like this
Expand|Select|Wrap|Line Numbers
  1. SELECT tbl.* FROM tbl WHERE DateDiff("m", Date, tbl.[PerformanceReviewDate])<1;
  2.  
Worked perfectly! Thanks!
Sep 10 '07 #3

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

Similar topics

8
5914
by: inamori | last post by:
I face that problems 07/01/2003 06/30/2006 ---------> it should be 3 01/01/2003 02/28/2005 --------->could i get 2 years and 2 months 01/01/2003 03/01/2005 ...
4
11903
by: Paolo | last post by:
I am having some problem with a Year Function. I have form on which I have 4 field which indicate dates and an additional form which sums those dates: These are the fields: YEARS...
5
6664
by: mcbill20 | last post by:
Hello all. I have a really basic question that I hope someone has a better answer for. I apologize in advance-- I know this is probably a really basic question but I am used to Oracle rathern than...
6
7631
by: kevinjwilson | last post by:
I am trying to get the date difference between two dates but I don't want the function to include weekends in the calculation. Does anyone have an idea on how to make this work?
10
1715
AccessIdiot
by: AccessIdiot | last post by:
Wow I'm failing miserably today. :-( I have a table with three colums: fill_start, fill_end, fill_dur. Fill_dur is supposed to calculate the difference in minutes between fill_start and fill_end....
9
2808
by: StevoNZ | last post by:
Hi, I am a little stuck with a query I am trying to build. Attemting to calculate the delivery time for a material. I have managed to utilise the DateDiff function, but have some additional...
7
5939
by: JenM | last post by:
Hi. I am a novice user. I am using the datediff function in a query. I am trying to calculate the number of week days between two dates. When I use "m" as the interval, the number of weeks is...
3
2483
by: Jennifer | last post by:
I've got a bit of a problem calculating the duration of hours between a clock-in time and a clock-out time. It's a fairly straight-forward process. I put the clock-ins, clock-outs in a temp table...
3
2503
by: mfuentes74 | last post by:
I have a DateDiff calculation which well return negatives times I need to make the negative times zero. My calculation is DateDiff("n",,)
0
7037
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6904
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
6886
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5324
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4768
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
2990
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
2976
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
558
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
174
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.