WebI: Calculating Elapsed Time and Days

Summary

This article will explain how to calculate elapsed days and times in WebI.

 

How-To

Task: Calculate elapsed time or days between two dates

Instructions

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

Step 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).

Step 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.

 

Examples

Example 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)
 

Example 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)

 

Outcome

You will be able to calculate elapsed time and dates in WebI.

 

Need Additional Help?

If you have questions not answered here, please submit a request to the Center for DATA WebI team, or contact the Technology Help Desk.