?
Solved

Query design Microsoft Access

Posted on 2012-04-09
2
Medium Priority
?
298 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 2000 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

Get proactive database performance tuning online

At Percona’s web store you can order full Percona Database Performance Audit in minutes. Find out the health of your database, and how to improve it. Pay online with a credit card. Improve your database performance now!

Question has a verified solution.

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

The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
Ever visit a website where you spotted a really cool looking Font, yet couldn't figure out which font family it belonged to, or how to get a copy of it for your own use? This article explains the process of doing exactly that, as well as showing how…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

770 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