Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 412
  • Last Modified:

Total of different days between 2 dates

How I can calculate Total of different days between 2 dates ?

Vba
0
egovernment
Asked:
egovernment
1 Solution
 
CluskittCommented:
What do you mean by different days?
0
 
GrahamSkanCommented:
Days = DateDiff("d", Date1, Date2)
0
 
Patrick MatthewsCommented:
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now