Solved

Date/Time Calculations.

Posted on 1998-08-27
1
125 Views
Last Modified: 2010-04-30
After using Excel and Access and using date/time in calculation I'm no having much luck with vb5. I need to find elapsed time between two date and time.  All I get is an integer answer in days only. I need it in days and fraction of days. Do I have to convert the date/time to serial number first before doing the calculation?
0
Comment
Question by:chiefboats
1 Comment
 
LVL 8

Accepted Solution

by:
MikeP090797 earned 50 total points
ID: 1431487
You can use DateDiff to get the interval between to dates/times in any units you specify, it can be days, weeks, months, or even minutes.

D=DateDiff("h", D1, D2)
will get the interval between D1 and D2 in hours
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

947 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

19 Experts available now in Live!

Get 1:1 Help Now