WebI: Calculating Elapsed Time and Days

Task: Calculate elapsed time or days between two dates


There are two functions for calculating elapsed time and dates:  TimeBetween() and DatesBetween(). Both functions need:

  1. A starting date and an ending date. 
    If a truncated date (no time stamp) is used then the default time will be 12:00:00 am (midnight).
  2. A measurement period (i.e: Month, Year, Millisecond, Hour).
    • Acceptable periods for TimeBetween() are: DayPeriod, WeekPeriod, MonthPeriod, QuarterPeriod,SemesterPeriod, YearPeriod, HourPeriod, MinutePeriod, SecondPeriod, MillisecondPeriod
    • Acceptable periods for DatesBetween() are: DayPeriod, WeekPeriod, MonthPeriod, QuarterPeriod, SemesterPeriod, YearPeriod.


  1. You need to calculate the number of years between two objects in your reporting area: the date you acquired a piece of equipment [Acquired Date], and the date the data was last exported to your reporting area [Last Export Date]. The equation would be written as:

           =DatesBetween([Acquired Date];[Last Export Date];YearPeriod)
  2. You need to calculate the time elapsed minutes between two objects in your reporting area: the date and time a request for service was received (Received Date], and the date and time the request for service was closed [Closed Date]. The equation would be written as:

=TimeBetween([Received Date];[Closed Date];HourPeriod)

*Need help?*
If you need help, please contact the Center for DATA WebI team at https://td.usnh.edu/TDClient/Requests/ServiceDet?ID=142,  or by calling the IT Service Desk at 862-4242.


Article ID: 1809
Fri 7/19/19 6:22 PM
Wed 9/27/23 10:50 AM
Applicable Institution(s):
Keene State College (KSC)
Plymouth State University (PSU)
University of New Hampshire (UNH)
USNH System Office