Subtracting timestamps

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!
 
K

KARL DEWEY

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top