tags:

views:

15

answers:

0

Please do help me out . starttime and endtime will be provided in dd-mm-yyyy hh:mm:ss as input. (6-14)hr ,(14-22)hr,(22-6)hr are the three different shifttimes . a machine's downtime(starttime and endtime) can be in any of the above shifttimes. forex :starttime:24-03-2010 14:00:00 endtime:25-03-2010 24:00:00 now the downtime duration should be split into two and continue on next shift as a new record if exceeds previous shift time.

output required

shif duration

(14-22)hr 480 minutes

(22-6)hr 120 minutes

Thanks in advance ,

malini