Solved

Query design Microsoft Access

Posted on 2012-04-09
2
290 Views
Last Modified: 2012-04-09
I have a table called tblInvoicesSubmitted. I have a field named named DateSubmitted and a field named DateCheckRequested. It would also include a field named InvoiceID for identification purposes. I need a calculation, for Access, that will calculate the number of days inbetween these two fields (for example if it was 30 days). I want this calculation to show up in it's own field and then to be sorted by largest to smallest.
0
Comment
Question by:mmcgillo88
2 Comments
 
LVL 119

Accepted Solution

by:
Rey Obrero earned 500 total points
Comment Utility
to calculate for the days difference, use datediff()

select invoiceid, [DateCheckRequested],[DateSubmitted], datediff("d",[DateCheckRequested],[DateSubmitted])
from yourTable
0
 
LVL 10

Expert Comment

by:plummet
Comment Utility
Yes, that's the solution, so in the query designer add a column with the following value as specified by Capricorn1:

datediff("d",[DateCheckRequested],[DateSubmitted])
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…

763 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