Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Query design Microsoft Access

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
With its various features, Office 365 can not only help you with your day-to-day business tasks, it can also do wonders for your marketing campaign.
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…

810 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