Set the time period to use for calculations

Set the time period to use for calculations

To set the time period to use in calculations you can use the Earliest and Latest functions as start and end dates respectively. These functions allow extension of the time period under consideration, to the beginning or end of time. (Note that attempting to calculate any date differences with these values will result in uncertain.)

What do you want to do?

Get a date value equivalent to the earliest possible date

Get a date value equivalent to the latest possible date

Get a date value equivalent to the earliest possible date

To get a date value equivalent to the earliest possible date, you use the Earliest function. This function will return a date guaranteed to be earlier than the value of any date attribute or expression.

The syntax for this function is:

 

For example, an applicant is paid a benefit monthly, and the amount of the payment is a temporal value with values on specific days as follows (and 0 elsewhere):

15/4/2007: $120, 15/5/2007: $100, 15/6/2007: $120, 15/7/2007: $90

 

To calculate the amount of the benefit paid to the applicant up to 1/7/2007, the Earliest function is used as the start date in an Interval Daily Sum function. In Word you would write this rule as:

the amount of benefit paid to the applicant up until 1/7/2007 = IntervalDailySum(Earliest(),2007-07-01,the amount of the monthly payment)

 

The result for 'the amount of benefit paid to the applicant up until 1/7/2007' would be $340 (ie $120+$100+$120) where p2 is 'the amount of the monthly payment'.

 

 

Get a date value equivalent to the latest possible date

To get a date value equivalent to the latest possible date, you use the Latest function.This function will return a date guaranteed to be later than the value of any date attribute or expression.

The syntax for this function is:

 

For example, an applicant is paid a benefit monthly, and the amount of the payment is a temporal value with values on specific days as follows (and 0 elsewhere):

15/4/2007: $120, 15/5/2007: $100, 15/6/2007: $120, 15/7/2007: $90

 

To calculate the amount of the benefit paid to the applicant since 6/5/2007, the Latest function is used as the end date in an Interval Daily Sum function. In Word you would write this rule as:

the amount of benefit paid to the applicant since 1/7/2007 = IntervalDailySum(2007-07-01,Latest(),the amount of the monthly payment)

 

The result for 'the amount of benefit paid to the applicant since 1/7/2007' would be $210 (ie $120+$90) where p2 is 'the amount of the monthly payment'.