Evaluating Elapsed Minutes

Evaluating Elapsed Minutes

You might need to keep track of the total minutes between one date or time and another. To get the totalminutes, use a line like this:

 lTotalMinutes = Minutes(Now) - _        Minutes(datStartTime)This function returns the number of minutes since 01/01/1900:Public Function Minutes(d As Date) _        As Long        'Minutes since 1900        Dim lPreviousDays As Long        Dim lTotalMinutes As Long        lPreviousDays = d - #1/1/1900#        lTotalMinutes = _                (lPreviousDays * 24) * 60        lTotalMinutes = lTotalMinutes + _                Hour(d) * 60        lTotalMinutes = lTotalMinutes + _                Minute(d)        Minutes = lTotalMinutesEnd Function
See also  How to Block Websites During Certain Hours on a Mac Computer

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist