Hello all, I need some help working out an elapsed time routine. I'm loath= to ask for help as I hope to enter the final thing in the= competition, but-- I have a start time (in minutes) and a duration time(in minutes)= and I always get a maths error at one point of testing. So far I have two algorithms and both fail at the same time= difference - could some poke me in the right direction? Alg 1. IF StartMinutes + Duration Minutes > 60 then Mdiff=3D60- StartMinutes Off=3DDurationMinutes-Mdiff OTHERWISE just add the two together Alg 2. IF start etc then off=3D (startM's+DurM's )-60 OTHERWISE etc. The test data (ignore hours they work ) in minutes only.= Duration times are in 15min increments Start Dur Expected Result 40 45 20 50 30 20 50 15 5 55 15 10 50 45 35 All the results except the first one match, the first one= matches if I use15 or 30 minutes as the duration time, I just= can't fathom where I need to make an adjustment. All pointers gratefully received. Colin -- cdb, cdb@barnard.name on 31/03/2002 -- cdb, bodgy1@optusnet.com.au on 27/06/2002 -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads