Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

subtracting time 1

Status
Not open for further replies.

robinsql

Programmer
Aug 2, 2002
236
IE
Hi all,
I have two datetime fields and need find the elapsed time between them.
For example...

1. 18/09/2003 00:52:53

2. 18/09/2003 00:54:52


I need this to return 00:01:59

Any help gratefully received,
Thanks,
Robin
 
If these are two different fields, you could use the following:

time({table.datetime2}-{table.datetime1})

Both datetimes and the formula itself should be formatted in military time, using format field->datetime->customize->time->24-hour and adding the seconds field (05) and the separator :))

If these are two different instances of the same field then try:

time({table.datetime}-previous({table.datetime}))

-LB
 
Thanks a mill,
I can't mark the post as helpful though as my machine is screwed. Keeps telling me the RPC server is unavailable!? I think a virus is at work somewhere.
Cheers,
Robin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top