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
Share the Post:
Share on facebook
Share on twitter
Share on linkedin

Overview

Recent Articles: