calculate elapsed time
Can Numbers calculate elapsed time between to dates or two times?
Mac OS X (10.7.2)
Can Numbers calculate elapsed time between to dates or two times?
Mac OS X (10.7.2)
Hi Rick,
Here's an example of each.
The DATEDIF formula in the selected cell is shown in the illustration's Formula bar.
DATEDIF returns a numerical value. The meaning of that number depends on the setting of the third argument in the DATEDIF function, here "days".
E2 - H2 and E4 - H4 all contain the formula =$C-$B
The subtraction operator ( - ) returns a Duration value when the values in C and B are Date and Time values. The Duration value may be formatted to show a combination of Weeks, Days, Hours, Minutes, Seconds and milliseconds (or, as done above, to show only one of these units).
Note that, as demonstrated in the bottom table, ALL cells displaying date OR time information actually contain a Date and Time value.
Values entered as dates (like those in row 2) have the time part set to 00:00:00 (midnight at the start of that date), as shown in row 2 of the bottom table.
Values entered as times of day (like those in row 4) include the date on which the entry was made as the Date part, as shown in row 4 of the bottom table.
It is the actual value in the cell, not the displayed part of that value, that is retrieved by formulas and used in calculations.
Regards,
Barry
Hi Rick,
Here's an example of each.
The DATEDIF formula in the selected cell is shown in the illustration's Formula bar.
DATEDIF returns a numerical value. The meaning of that number depends on the setting of the third argument in the DATEDIF function, here "days".
E2 - H2 and E4 - H4 all contain the formula =$C-$B
The subtraction operator ( - ) returns a Duration value when the values in C and B are Date and Time values. The Duration value may be formatted to show a combination of Weeks, Days, Hours, Minutes, Seconds and milliseconds (or, as done above, to show only one of these units).
Note that, as demonstrated in the bottom table, ALL cells displaying date OR time information actually contain a Date and Time value.
Values entered as dates (like those in row 2) have the time part set to 00:00:00 (midnight at the start of that date), as shown in row 2 of the bottom table.
Values entered as times of day (like those in row 4) include the date on which the entry was made as the Date part, as shown in row 4 of the bottom table.
It is the actual value in the cell, not the displayed part of that value, that is retrieved by formulas and used in calculations.
Regards,
Barry
calculate elapsed time