Solved

Total of different days between 2 dates

Posted on 2011-09-16
3
355 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
Comment Utility
What do you mean by different days?
0
 
LVL 76

Accepted Solution

by:
GrahamSkan earned 500 total points
Comment Utility
Days = DateDiff("d", Date1, Date2)
0
 
LVL 92

Expert Comment

by:Patrick Matthews
Comment Utility
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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

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

11 Experts available now in Live!

Get 1:1 Help Now