Subtracting timestamps

  • Thread starter Thread starter Surayo
  • Start date Start date
S

Surayo

Hi, I have two fields both timestamped, in long format (i.e. 6/14/2009
10:39:58 AM) and I need to find out the time difference between them. I used
an ElapsedTimeString module and code that I found on the internet which works
great with just Long Time, but not the full timestamp (with a date included).
I'm looking for a count of minutes or seconds between the two times. Any
ideas how to formulate an expression for this?

Thank you in advance for any assistance you can provide!
 
DateDiff("n",[Field1],[Field2]) difference in minutes, use 's' for seconds.

Maybe you could use the ElapsedTimeString module if you removed the date
like this -- TimePart([Field1])
but if timestamps extend over midnight it will be wrong. You would
need to account for the additional time.
 
Back
Top