Solved

Total of different days between 2 dates

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

Vba
0
Comment
Question by:egovernment
[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
3 Comments
 
LVL 18

Expert Comment

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

Accepted Solution

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

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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ORDER BY 7 38
access query - filter field for particular number format 3 30
Convert VBA UDF to SQl SERVER UDF 4 50
MS Access How can I complete my Max, Group by query? 13 25
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
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…

733 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