Solved

Date/Time Calculations.

Posted on 1998-08-27
1
124 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
Comment Utility
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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

771 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

7 Experts available now in Live!

Get 1:1 Help Now