Solved

Query design Microsoft Access

Posted on 2012-04-09
2
297 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 500 total points
ID: 37823228
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
ID: 37823243
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

Office 365 Training for IT Pros

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

My attempt to use PowerShell and other great resources found online to simplify the deployment of Office 365 ProPlus client components to any workstation that needs it, regardless of existing Office components that may be needing attention.
If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
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…
Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.

696 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