473,386 Members | 1,773 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,386 software developers and data experts.

access 2003 how do I use the difference between a date in the record and today

Hello I am an old programmer (since 1964) but new to access. I have a Job table that contains a "promise date". I want a query that will extract all records whose "promise date" is within 3 days of the current date. This has got to be simple but I am probably looking for something hard. Thanks in advance.
Mar 20 '10 #1
2 1251
patjones
931 Expert 512MB
Hi ernie -

In Access there is a built-in function called DateDiff. The Access help pages do a nice job discussing DateDiff, but I'll just say that in your case you'll want to write out the criteria to be something like

Expand|Select|Wrap|Line Numbers
  1. Abs(DateDiff("d", Now(), [promise date])) <= 3

Here, "d" just means that you want whole days to be the time interval that the function works with. Of course, there are other important details, like whether you are doing this in Query Design view, or in VBA code. Let me know some more of how you're trying to accomplish this and I can fine-tune the answer for you.

And, as an aside, seeing that you were programming back in 1964, would any of your experience happen to have been with FORTRAN?

Pat
Mar 21 '10 #2
Actually I found my own answer. In the criteria for the query in the desired field I used >now()+3
Mar 25 '10 #3

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

Similar topics

4
by: JMCN | last post by:
object invalid or no longer set - confusion of the recordset in access 2003. i am currently converting from access 97 to access 2003. majority of the codes converted over perfectly fine, though...
6
by: Terry Bell | last post by:
We've had a very large A97 app running fine for the last seven years. I've just converted to SQL Server backend, which is being tested, but meanwhile the JET based version, running under terminal...
7
by: manning_news | last post by:
I've got a report that's not sorting correctly. I build a SQL statement and assign it to the recordsource in the Open event, sorting the data the way the user chooses. The user can choose up to 3...
52
by: Neil | last post by:
We are running an Access 2000 MDB with a SQL 7 back end. Our network guy is upgrading to Windows Server 2003 and wants to upgrade Office and SQL Server at the same time. We're moving to SQL Server...
1
by: wdw1970 | last post by:
Hello Everyone! This is my first post to the forum. --------------------------------------------------------------------------------------------- In my database, I have a continuous...
1
by: LostBoy | last post by:
Hello, I have been giving a big task to add some additional features to the Access DB at work. I am not the one who originally created the DB, which makes it harder. I am familiar with access but...
8
by: Trev | last post by:
Hi Can anyone point me in the right direction here, I would like to open a table in access 2003 by date. I have an asp web page which needs to read data from a table with each days today's date...
4
by: corey11 | last post by:
I'm a very low-level developer with limited VB knowledge but nonetheless was able to put together a very user-friendly and extremely helpful Access 97 database for my company some 10 years back. We...
3
by: Harlequin | last post by:
I must start this posing by making the point that I am NOT a VB programmer and I'm something of a Newbie to MS Access. I can program in a number of languages (Java, Javascript, PERL,PHP and TCL) but...
4
by: viki1967 | last post by:
Hi everyone. With ASP I register in DB Access rows of one file excel; this procedure works but problem: Access record double rows of file excel. You can exclude from registration double rows ?...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.