Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 32
Default Difference between dates/times in Days & Hours

Hi,

I need to calculate the difference between two dates/times. The date/time
is entered in this format:

12/12/07 3:52 PM

When I simply subtract the end date from the start date, it gives me a
number in days with two-digit decimal place for partial day (e.g., 5.01). Is
there a way to format the cell or add to my simple formula (=B2-A2) to
convert the number into days/hours/minutes of some kind? I've been
experimenting without much luck, and didn't see a posting that was specific
to this issue.

Thank you in advance,
Steve
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 419
Default Difference between dates/times in Days & Hours

Steve,

How about this:

=DAY(B2-A2) & " Days " & HOUR(B2-A2) & " Hours " & MINUTE(B2-A2) & " Minutes
" & SECOND(B2-A2) & " Seconds"

Will that work for you?

HTH,

Conan




"Steve Vincent" wrote in message
...
Hi,

I need to calculate the difference between two dates/times. The date/time
is entered in this format:

12/12/07 3:52 PM

When I simply subtract the end date from the start date, it gives me a
number in days with two-digit decimal place for partial day (e.g., 5.01).
Is
there a way to format the cell or add to my simple formula (=B2-A2) to
convert the number into days/hours/minutes of some kind? I've been
experimenting without much luck, and didn't see a posting that was
specific
to this issue.

Thank you in advance,
Steve



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default Difference between dates/times in Days & Hours

Custom format as dd " days " hh:mm
--
David Biddulph

"Steve Vincent" wrote in message
...
Hi,

I need to calculate the difference between two dates/times. The date/time
is entered in this format:

12/12/07 3:52 PM

When I simply subtract the end date from the start date, it gives me a
number in days with two-digit decimal place for partial day (e.g., 5.01).
Is
there a way to format the cell or add to my simple formula (=B2-A2) to
convert the number into days/hours/minutes of some kind? I've been
experimenting without much luck, and didn't see a posting that was
specific
to this issue.

Thank you in advance,
Steve



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
How do I calculate dates and times, w/answer of days & hours Debby_Jo Excel Worksheet Functions 4 April 27th 07 04:05 AM
Need difference between two dates/times in hours ramsdesk Excel Worksheet Functions 10 April 25th 06 11:33 PM
find days and hours between 2 sets of dates and times The Auditor Excel Discussion (Misc queries) 1 February 3rd 06 07:58 PM
HOURS DIFFERENCE IN TIME BETWEEN DIFFERENT DATES AND TIMES tankerman Excel Worksheet Functions 1 September 13th 05 04:31 PM
How do I calculate difference in days & hours between two dates e. probi2 Excel Worksheet Functions 1 January 12th 05 03:59 PM


All times are GMT +1. The time now is 08:34 PM.

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"