2 Replies Latest reply on May 24, 2013 10:13 AM by sean.carroll

    Calculate Elapsed Time Between Status Change Using One Field

    sean.carroll

      I have looked at DATEDIFF and all postings but still cannot figure out how to solve this.  My database captures an Activity Date w/o time stamp and also has a Activity Time field which is just a floating number representing military time.  My goal is to look for a Status of "AT" then look for the first occurrence of a Status of "98" and calculate the elapsed time between those two occurrences. I would then locate the next "AT" Status and next "98" Status and calculate the elapsed time between those two occurrences. Since the elapsed time could occur over midnight I messed with creating a combined time stamp both for "AT" time and "98" time.  I also reformatted it to military time in a field called AT Time but still not sure how to calculate anything.  I hope to do this against live data (IBM Informix). Any help is greatly appreciated!!!