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
Solved

Date/Time Calculations.

Posted on 1998-08-27
1
127 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
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…
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…

839 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