?
Solved

Total of different days between 2 dates

Posted on 2011-09-16
3
Medium Priority
?
413 Views
Last Modified: 2012-08-13
How I can calculate Total of different days between 2 dates ?

Vba
0
Comment
Question by:egovernment
3 Comments
 
LVL 18

Expert Comment

by:Cluskitt
ID: 36548261
What do you mean by different days?
0
 
LVL 77

Accepted Solution

by:
GrahamSkan earned 2000 total points
ID: 36548281
Days = DateDiff("d", Date1, Date2)
0
 
LVL 93

Expert Comment

by:Patrick Matthews
ID: 36549965
Do you need to take time of day into account?  For example:

Date1: 2011-09-15 20:37
Date2: 2011-09-16 04:15

In that scenario, DateDiff("d", Date1, Date2) returns 1, even though a full 24 hours have not elapsed.  That may or may not be what you need.

Patrick
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Question has a verified solution.

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

A Case Study of using the Windows API to provide RS232 communications capability in Access without the use of Active-X controls.
A quick solution showing how to control and open a POS Cash Register Drawer using VBA with MS Access.
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
How can you see what you are working on when you want to see it while you to save a copy? Add a "Save As" icon to the Quick Access Toolbar, or QAT. That way, when you save a copy of a query, form, report, or other object you are modifying, you…

588 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