Time period functions

Use time period functions to define, calculate, and compare time points.
Table 1. Functions for computing a time period
Syntax Description  
the period between <date & time> and <date & time>
Returns the time period between two time points.
the period between the new scheduled arrival date of 'first flight delayed' and now
the period of <calendar duration> before <date & time>
Returns the time period expressed in time units that precedes a specific date.
the period of 7 days before 'purchase event'
the period of <calendar duration> after <date & time>
Returns the time period expressed in time units that follows a specific date.
the period of 1 month after 'purchase event'
the period of <calendar duration> ending at <date & time>
Returns the time period expressed in time units that ends at a specific date.
the period of 7 days ending at 'purchase event'
the period of <calendar duration> starting at <date & time>
Returns the time period expressed in time units that starts a specific date.
the period of 7 days starting at 'purchase event'
the period of <calendar duration> before <time period>
Returns the time period expressed in time units that precedes another time period.
the period of 7 days before 'trip period'
the period of <calendar duration> after <time period>
Returns the time period expressed in time units that follows another time period.
the period of 1 month after 'trip period'
Table 2. Functions for computing a time point
Syntax Description  
<calendar duration> before <time period> 
Returns a new time point that precedes the specified time point by the specified duration.
3 hours before 'flight period'
<calendar duration> after <time period> 
Returns a new time point that follows the specified time point by the specified duration.
2 months 3 days after 'flight period'
Table 3. Functions for comparing a time period with another time period or a time point
Syntax Description  
<time period> is during the same time as <time period>
Checks that the two time periods are identical and on the same time zone.
if the calendar week of meeting is during the same time as the calendar week of departure
<time period> overlaps with <time period>
Checks that the time period overlaps another time period.
if 'flight period' overlaps with 'trip period'
<time period> is before <time period>
Checks that the time period comes before another time period.
if 'flight period' is before 'trip period'
<time period> is after <time period> 
Checks that the time period comes after another time period.
if 'trip period' is after 'flight period'
<time period> is before <date & time> 
Checks that the time period comes before a specific time point
if 'trip period' is before 3/11/2019 5:32:38 PM
<time period> is after <date & time> 
Checks that the time period comes after a specific time point.
if 'trip period' is after 3/7/2019 5:32:38 PM
<time period> includes <date & time> 
Checks that the time period includes a specific time point.
if 'trip period' includes the time of 'the purchase event'
<time period> starts at <date & time>
Checks that a time period starts at a specific time point.
if 'trip period' starts at 3/7/2019 6:00:00 PM
<time period> ends at <date & time>
Checks that a time period ends at a specific time point.
if 'trip period' ends at 3/11/2019 6:00:00 PM
Table 4. Functions for comparing durations
Syntax Description  
<time period> is longer than <time period>
Checks that the length of a time period is longer than another one.
if 'trip period' is longer than 'flight period'
<time period> is longer than or equal to <time period>
Checks that the length of a time period is equal to or longer than another one.
if 'trip period' is longer than or equal to 'flight period'
<time period> is shorter than <time period>
Checks that the length of a time period is shorter than another one.
if 'trip period' is shorter than 'flight period'
<time period> is shorter than or equal to <time period>
Checks that the length of a time period is equal to or shorter than another one.
if 'trip period' is shorter than or equal to 'flight period'
<time period> is longer than <calendar duration> 
Checks that the length of a time period is longer than a calendar duration.
if 'trip period' is longer than 6 hours
<time period> is longer than or equal to <calendar duration>
Checks that the length of a time period is equal to or longer than a calendar duration.
if 'trip period' is longer than or equal to 2 hours 30 minutes
<time period> is shorter than <calendar duration> 
Checks that the length of a time period is shorter than a calendar duration.
if 'trip period' is shorter than 2 hours
<time period> is shorter than or equal to <calendar duration> 
Checks that the length of a time period is equal to or shorter than a calendar duration.
if 'trip period' is shorter than or equal to 2 hours
Table 5. Accessor functions for time periods
Syntax Description  
the start of <time period>
Defines the start point of a time period.
the start of meeting is before 2019/12/01 12:00:00 AM
the end of <time period>
Defines the end point of a time period.
the end of meeting is before 2019/12/01 12:00:00 AM