I think a custom tradingTimeDifference() method would be doable. Certainly calculating weekdays vs weekends shouldn't be too difficult and other non-trading days can be handled with a lookup table. Though a bit tricky I think, once debugged, that it would be more efficient and less error prone than your other proposal. What would happen, for instance, if something failed to record for a few minutes? That would throw off hundreds if not thousands of difference computations.
Bob Matthews wrote:We may be heading to a situation where I have two dates and time and you may think it is easy to subtract one from the other to get a Time Difference BUT weekends and holidays - no trading - so it gets tricky to get a correct Time Difference
Sorry, don't quite get this.
e.g. 2159 Friday and 2205 Sunday would yield 6 for a Time Difference