ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How to compute duration in excel (https://www.excelbanter.com/excel-discussion-misc-queries/46827-how-compute-duration-excel.html)

Jeff

How to compute duration in excel
 
Hi may I know why we could compute a duration in # of Day, Hours and Minutes.
For example, column 1 is Date 2005/09/22 and Column 2 is Time 10:20:15.
Assuming now is 2005/09/23 and Time 06:14:30. How do I make use of excel
function to get value 0 Days 19 Hrs 54 mins in column 3 ?
Thanks.

Bob Phillips

Subtract the former from the later and format the result as date and time.

--
HTH

Bob Phillips

"Jeff" wrote in message
...
Hi may I know why we could compute a duration in # of Day, Hours and

Minutes.
For example, column 1 is Date 2005/09/22 and Column 2 is Time 10:20:15.
Assuming now is 2005/09/23 and Time 06:14:30. How do I make use of excel
function to get value 0 Days 19 Hrs 54 mins in column 3 ?
Thanks.




Myrna Larson

Hi, Bob:

Just a caveat: I assume you mean a format like d hh:mm. This won't work if the
time span is greater than 31 days: in the custom format you can't specify [d]
for the days, so 31 would be followed by 1 rather than 32.

Myrna Larson



On Fri, 23 Sep 2005 09:11:44 +0100, "Bob Phillips"
wrote:

Subtract the former from the later and format the result as date and time.


Jeff

Bob,

What if there is no current date/time column in excel. Is there a specially
formula such as '%DATE-A1' tabulate in column 3 ?

Rgds..Jeff

"Bob Phillips" wrote:

Subtract the former from the later and format the result as date and time.

--
HTH

Bob Phillips

"Jeff" wrote in message
...
Hi may I know why we could compute a duration in # of Day, Hours and

Minutes.
For example, column 1 is Date 2005/09/22 and Column 2 is Time 10:20:15.
Assuming now is 2005/09/23 and Time 06:14:30. How do I make use of excel
function to get value 0 Days 19 Hrs 54 mins in column 3 ?
Thanks.





Dave Peterson

Excel has =today() for today's date and =now() for the current date/time.

So you could use:
=today()-a1
(formatted as general)

Remember that those functions get updated--they're not static.

Jeff wrote:

Bob,

What if there is no current date/time column in excel. Is there a specially
formula such as '%DATE-A1' tabulate in column 3 ?

Rgds..Jeff

"Bob Phillips" wrote:

Subtract the former from the later and format the result as date and time.

--
HTH

Bob Phillips

"Jeff" wrote in message
...
Hi may I know why we could compute a duration in # of Day, Hours and

Minutes.
For example, column 1 is Date 2005/09/22 and Column 2 is Time 10:20:15.
Assuming now is 2005/09/23 and Time 06:14:30. How do I make use of excel
function to get value 0 Days 19 Hrs 54 mins in column 3 ?
Thanks.





--

Dave Peterson

Jeff

Thanks Dave. It's helpful.

"Dave Peterson" wrote:

Excel has =today() for today's date and =now() for the current date/time.

So you could use:
=today()-a1
(formatted as general)

Remember that those functions get updated--they're not static.

Jeff wrote:

Bob,

What if there is no current date/time column in excel. Is there a specially
formula such as '%DATE-A1' tabulate in column 3 ?

Rgds..Jeff

"Bob Phillips" wrote:

Subtract the former from the later and format the result as date and time.

--
HTH

Bob Phillips

"Jeff" wrote in message
...
Hi may I know why we could compute a duration in # of Day, Hours and
Minutes.
For example, column 1 is Date 2005/09/22 and Column 2 is Time 10:20:15.
Assuming now is 2005/09/23 and Time 06:14:30. How do I make use of excel
function to get value 0 Days 19 Hrs 54 mins in column 3 ?
Thanks.




--

Dave Peterson



All times are GMT +1. The time now is 07:15 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com