PC Review


Reply
Thread Tools Rate Thread

calculating difference in time

 
 
=?Utf-8?B?dGFtMjU=?=
Guest
Posts: n/a
 
      7th Sep 2007
how do we calculate the amount of time between two set times? for example,
d2 as time of 10pm and b2 has time of 7am. do we need to have the column
formatted as a time or number? Or is there a specific calc we need?

Help please
 
Reply With Quote
 
 
 
 
David Biddulph
Guest
Posts: n/a
 
      7th Sep 2007
=MOD(D2-B2,1), and format as [h]:mm
The MOD() formula allows for times running over midnight, so if you wanted
to work out the time from 10pm to 7am, =MOD(B2-D2,1) would do it for you.
If you want to convert to decimal hours, =24*MOD(B2-D2,1), and format as
number or general, not time.

You'll have to make sure you enter 7 am with the space, as 7am without a
space will be treated as text. Similarly with the pm.
--
David Biddulph

"tam25" <(E-Mail Removed)> wrote in message
news:10A8D2B3-2F5F-4461-9552-(E-Mail Removed)...
> how do we calculate the amount of time between two set times? for
> example,
> d2 as time of 10pm and b2 has time of 7am. do we need to have the column
> formatted as a time or number? Or is there a specific calc we need?
>
> Help please



 
Reply With Quote
 
=?Utf-8?B?TWlrZSBI?=
Guest
Posts: n/a
 
      7th Sep 2007
Hi,

You don't say which is the earlier time so the difference could be 3 hrs or
21 hrs

This formula will work it out the difference with the earlier time in B2

=IF(B2>D2,D2+1-B2,D2-B2)

Use a custom format of hh:mm

Mike



"tam25" wrote:

> how do we calculate the amount of time between two set times? for example,
> d2 as time of 10pm and b2 has time of 7am. do we need to have the column
> formatted as a time or number? Or is there a specific calc we need?
>
> Help please

 
Reply With Quote
 
David Biddulph
Guest
Posts: n/a
 
      7th Sep 2007
9 or 15, not 3 or 21, Mike?
--
David Biddulph

"Mike H" <(E-Mail Removed)> wrote in message
news:6EBB85E8-0A5B-4912-9004-(E-Mail Removed)...
> Hi,
>
> You don't say which is the earlier time so the difference could be 3 hrs
> or
> 21 hrs
>
> This formula will work it out the difference with the earlier time in B2
>
> =IF(B2>D2,D2+1-B2,D2-B2)
>
> Use a custom format of hh:mm
>
> Mike


> "tam25" wrote:
>
>> how do we calculate the amount of time between two set times? for
>> example,
>> d2 as time of 10pm and b2 has time of 7am. do we need to have the column
>> formatted as a time or number? Or is there a specific calc we need?
>>
>> Help please



 
Reply With Quote
 
=?Utf-8?B?TWlrZSBI?=
Guest
Posts: n/a
 
      7th Sep 2007
it's early

"David Biddulph" wrote:

> 9 or 15, not 3 or 21, Mike?
> --
> David Biddulph
>
> "Mike H" <(E-Mail Removed)> wrote in message
> news:6EBB85E8-0A5B-4912-9004-(E-Mail Removed)...
> > Hi,
> >
> > You don't say which is the earlier time so the difference could be 3 hrs
> > or
> > 21 hrs
> >
> > This formula will work it out the difference with the earlier time in B2
> >
> > =IF(B2>D2,D2+1-B2,D2-B2)
> >
> > Use a custom format of hh:mm
> >
> > Mike

>
> > "tam25" wrote:
> >
> >> how do we calculate the amount of time between two set times? for
> >> example,
> >> d2 as time of 10pm and b2 has time of 7am. do we need to have the column
> >> formatted as a time or number? Or is there a specific calc we need?
> >>
> >> Help please

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calculating Time difference Ayo Microsoft Access 6 1st Jul 2008 08:44 AM
calculating time difference Michel Khennafi Microsoft Excel Worksheet Functions 1 31st Jan 2008 02:37 PM
Calculating Time Difference drmrinalini@gmail.com Microsoft Access Queries 2 15th Apr 2007 03:07 PM
Re: Daylight Saving Time (DST) and calculating time difference. Peter T Microsoft Excel Programming 3 19th Jan 2007 10:51 AM
Re: Daylight Saving Time (DST) and calculating time difference. Chip Pearson Microsoft Excel Programming 1 17th Jan 2007 03:35 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:49 AM.