This function calculates the difference in minutes between samples of two attributes. For example, suppose we have the following case fragment:
05 May 13 06 May 13 09 May 13 Received 201305051234 201305060909 201305091614 Dispatched 201305051244 201305060928 201305091634
Note: Received and Dispatched are both dates with the format yyyyMMddHHmm.
If we want to know the difference in minutes between Received and Dispatched, we can define a Calculated Value Attribute named “MinutesWaiting” with the following formula:
minutes difference between Dispatched and Received
Then, the evaluation for this case will be:
05 May 13 06 May 13 09 May 13 Received 201305051234 201305060909 201305091614 Dispatched 201305051244 201305060928 201305091634 MinutesWaiting 10 19 20
Note that this function requires inputs in the form “yyyyMMddHHmm”. If the dates in your sample sequence are not already in this form, then you can use the as datetime in format … from format … function to re-write them in the required form.