Subject Time Fields
Author Paul Schmidt
Here is an interesting challenge to all.

ITable that contains two time values, START_TIME and END_TIME, now I
want to calculate the number of hours difference between them, with a
slight twist, according to the following table:

Minutes Start-Time End-Time

< 15 0.0 0.25
16 - 30 0.25 0.50
31 - 45 0.50 0.75
46 - 59 0.75 1.00

So from 14:03 to 14:58, would be calculated as from 14.00 to 15.00
and return 1.00 hours.

I know that the stored procedure for this, is going to win an ugly
contest, but I would like to be able to keep the actual physical
times, as well as the "rounded" times.

Paul


Paul Schmidt,
Tricat Technologies
Email: paul@...
Website: www.tricattechnologies.com