Time difference

Hi all,

I have two objects arrival and leave date/time.

I need to build an object that will show the time difference between these two objects.

eg,

Arrival datetime 01/01/2008 12:00:00
Leave datetime 01/01/2008 12:05:00

Time diff is 00:05:00


DEMO :uk: (BOB member since 2004-09-17)

Have a look at this link


KhoushikTTT :us: (BOB member since 2005-02-24)

Hi all,

My posting below was added a few months ago and the supplied link helped me solve the issue I was having. Howver I am now facing the same problem but this time the universe I am designing is over a SQL Server 2000 database.

Does anyone know a nice fix for finding the time difference between two datetime fields for a SQL Server 2000 database?

I’ve tried numerous converts(datetime) commands and datediff() but these dont seem to give me the correct values.

Example:
Login datetime = 10/01/09 22:00:00
Logout datetime = 11/01/09 05:19:00

Total login time should be 7:19 but i keep getting 4:41

Any thoughts?


DEMO :uk: (BOB member since 2004-09-17)