Skip to Content
Former Member
Sep 17, 2014 at 01:03 PM

DateDiff on Timestamps in Same Table


Hi, all. I've got a database I'm trying to get a datediff out of. The set up of the database is that one table is {table.transtype} with it being either "D, E, or A" and a corresponding {table.timestamp} that provides the timestamp. The other problem is that there can be either multiple or none of any of the time timestamps. For instance, someone is dispatched (D) but never en route so there is no (E or A) or someone is never dispatched but goes anyway (E & A) but no (D). I'm trying to set up a formula to allow me to get the datediff in seconds between D & E and again between E & A. Beyond the basic math, I'd love if I could have it flag whenever there is no transtype or timstamp or return a null response rather than 0. For instance, if I have a field that shows the datediff for E to A but the unit never went on scene, it would return "N/A" or blank instead of 0. Any assistance is greatly appreciated.