dingleberry
Programmer
Sample of data:
PartID BatchSer DateTime ISEPart
48 38487 1/8/07 7:57 AM 233960
48 38488 1/8/07 8:14 AM 233960
48 38489 1/8/07 8:16 AM 233960
48 38490 1/8/07 8:18 AM 233960
48 38491 1/8/07 8:20 AM 233960
51 24128 1/8/07 3:57 PM 826014
51 24129 1/8/07 4:03 PM 826014
51 24129 1/8/07 4:21 PM 826014
What I'm trying to do is 1:
Count the number of 48's and 51's and put them into a new column and 2:
When 48 changes to 51 subtract the 48 timestamp from the 51 timestamp to get the amount of time that expired when that value changed. If the day changed when 48 changed to 51 then we disregard that and don't subtract the timestamp. Any help?
PartID BatchSer DateTime ISEPart
48 38487 1/8/07 7:57 AM 233960
48 38488 1/8/07 8:14 AM 233960
48 38489 1/8/07 8:16 AM 233960
48 38490 1/8/07 8:18 AM 233960
48 38491 1/8/07 8:20 AM 233960
51 24128 1/8/07 3:57 PM 826014
51 24129 1/8/07 4:03 PM 826014
51 24129 1/8/07 4:21 PM 826014
What I'm trying to do is 1:
Count the number of 48's and 51's and put them into a new column and 2:
When 48 changes to 51 subtract the 48 timestamp from the 51 timestamp to get the amount of time that expired when that value changed. If the day changed when 48 changed to 51 then we disregard that and don't subtract the timestamp. Any help?