IPowerTime.TimeDiff method

TimeDiff <33> (PowerTime, Sign&, Days&, OPT Hours&, OPT Minutes&, OPT Seconds&, OPT MSeconds&&, OPT Ticks&&)

The internal PowerTime object is compared to the specified external PowerTime object. The difference is assigned to the parameter variables you provide. Sign& is -1 if the internal value is smaller. Sign& is 0 if the values are equal. Sign is +1 if the internal value is larger. The other parameters tell the difference as positive integer values. If you wish to return the time difference in units smaller than days, fill the unwanted parameters with BYVAL 0 and they will be ignored. For example:

ThisObject.TimeDiff(ThatObject, Sign&, BYVAL 0, BYVAL 0, Minutes&)

In the above, if the difference was precisely one day, the value 1440 would be assigned to Minutes& (24 hours * 60 minutes). If parameters are invalid, an appropriate error code is returned in OBJRESULT.