• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3636
  • Last Modified:

vb6 subtract date/time

How do I subtract the following and return hours and minutes in decimal format?

date1 = 1/1/08 10:00 AM
date2 = 1/1/08 2:15 PM

date2 - date1 should return 4.25
0
Delta7428
Asked:
Delta7428
1 Solution
 
bobbit31Commented:
something like:

Dim diffMin as Long
Dim diffHr as Double

diffMin = DateDiff("n", date1, date2)
diffHours = diffMin / 60

MsgBox diffHours
0
 
Delta7428Author Commented:
works exactly like ... thanks
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

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