Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22
Default Please Help Calculate Time Between 2 different Dates

I've serched and found some answers, but I'm just not sure If I doning
correctly.

I'm trying to have the .xls calculate the amount of time the user was
connected.

I currently have the following:
D22 D23
16-Aug-06 7:30:00 PM (This is when the User Connected)
17-Aug-06 5:30:00 AM (This is when the user Disconnected)

My current formula is:
=(E23-E22+(E23<E22))*24 Which gives me 240:00:00

But I want to see that that user was connected for 10:00:00

What am I doing wrong?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default Please Help Calculate Time Between 2 different Dates

You do not need to multiply by 24 in your formula.

Hope this helps.

Pete

Dtown Dawg wrote:
I've serched and found some answers, but I'm just not sure If I doning
correctly.

I'm trying to have the .xls calculate the amount of time the user was
connected.

I currently have the following:
D22 D23
16-Aug-06 7:30:00 PM (This is when the User Connected)
17-Aug-06 5:30:00 AM (This is when the user Disconnected)

My current formula is:
=(E23-E22+(E23<E22))*24 Which gives me 240:00:00

But I want to see that that user was connected for 10:00:00

What am I doing wrong?


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 427
Default Please Help Calculate Time Between 2 different Dates

With your sample data in A1:B2, try this formula in C2:
=((A2+B2)-(A1+B1))*24

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 252
Default Please Help Calculate Time Between 2 different Dates

If E22 contains both the date and time 8/16/2006 7:30 PM, and E23 contain
8/17/2006 5:30 AM, then all you need is this formula
=E23-E22

The formula you are using is for timesheets that allows for data to be
entered as time only (without the date). It multiplies by 24 to get a
decimal answer (10.25 instead of 10:15).

"Dtown Dawg" wrote:

I've serched and found some answers, but I'm just not sure If I doning
correctly.

I'm trying to have the .xls calculate the amount of time the user was
connected.

I currently have the following:
D22 D23
16-Aug-06 7:30:00 PM (This is when the User Connected)
17-Aug-06 5:30:00 AM (This is when the user Disconnected)

My current formula is:
=(E23-E22+(E23<E22))*24 Which gives me 240:00:00

But I want to see that that user was connected for 10:00:00

What am I doing wrong?

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22
Default Please Help Calculate Time Between 2 different Dates

If I don't multiply by 24 and only use (E23-E22) then the answer I get is:
################
So that didn't work.

"Pete_UK" wrote:

You do not need to multiply by 24 in your formula.

Hope this helps.

Pete

Dtown Dawg wrote:
I've serched and found some answers, but I'm just not sure If I doning
correctly.

I'm trying to have the .xls calculate the amount of time the user was
connected.

I currently have the following:
D22 D23
16-Aug-06 7:30:00 PM (This is when the User Connected)
17-Aug-06 5:30:00 AM (This is when the user Disconnected)

My current formula is:
=(E23-E22+(E23<E22))*24 Which gives me 240:00:00

But I want to see that that user was connected for 10:00:00

What am I doing wrong?





  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22
Default Please Help Calculate Time Between 2 different Dates

Actually I just went in and formated the cell as a number instead of time and
it works just fine.

"Dave O" wrote:

With your sample data in A1:B2, try this formula in C2:
=((A2+B2)-(A1+B1))*24


  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 252
Default Please Help Calculate Time Between 2 different Dates

E22 and E23 probably only contain time without the dates. You are getting a
negative value when you subtract 5:30 AM from 7:30 PM. In your example you
listed the dates with the times so I assumed they were together. I geuss
your table might look like this

D E
22 8/16/06 7:30 PM
23 8/17/06 5:30 AM

In which case you can use
=D23+E23-D22-E22

If the user won't be connected for more than 24 hours then you can use the
original formula (without the *24), otherwise you will need this one.

"Dtown Dawg" wrote:

If I don't multiply by 24 and only use (E23-E22) then the answer I get is:
################
So that didn't work.

"Pete_UK" wrote:

You do not need to multiply by 24 in your formula.

Hope this helps.

Pete

Dtown Dawg wrote:
I've serched and found some answers, but I'm just not sure If I doning
correctly.

I'm trying to have the .xls calculate the amount of time the user was
connected.

I currently have the following:
D22 D23
16-Aug-06 7:30:00 PM (This is when the User Connected)
17-Aug-06 5:30:00 AM (This is when the user Disconnected)

My current formula is:
=(E23-E22+(E23<E22))*24 Which gives me 240:00:00

But I want to see that that user was connected for 10:00:00

What am I doing wrong?



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
can excel calculate time increments in a formula? lmunzen Excel Worksheet Functions 2 September 11th 06 09:39 PM
formula to calculate time difference crossing midnight ditorejax Excel Worksheet Functions 3 August 17th 06 04:46 PM
Importing dates and military time from Excel into word doc mail me MikeOneill Excel Discussion (Misc queries) 1 August 13th 06 06:51 AM
calculate total service time in excel VCW Excel Discussion (Misc queries) 1 August 2nd 06 10:10 PM
calculate elapsed time between dates and times Jenna Excel Worksheet Functions 2 January 25th 06 04:39 PM


All times are GMT +1. The time now is 06:58 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"