![]() |
Calculating differences in dates
I want to calculate the difference between todays date and dates in the future in days, hours and minutes eg Today 30/06/2005 10:37 Future date 03/07/2005 11:48 Difference 3 days 1 hour 11 minutes What formula should I use and how should the cells be formatted? Thanks for any help -- Paul Sheppard ------------------------------------------------------------------------ Paul Sheppard's Profile: http://www.excelforum.com/member.php...o&userid=24783 View this thread: http://www.excelforum.com/showthread...hreadid=383463 |
Hi Paul, subtract NOW() from the future date custom format to dd" days ":hh" hours ":mm" minutes" There maybe a better way but this will work. HTH. -- greg7468 ------------------------------------------------------------------------ greg7468's Profile: http://www.excelforum.com/member.php...fo&userid=9031 View this thread: http://www.excelforum.com/showthread...hreadid=383463 |
Paul,
Is this any good? =(INT(A1-TODAY())-(MOD(A1,1)-MOD(NOW(),1)<0))&" days "&TEXT(MOD(A1-NOW(),1),"hh:mm:ss") -- HTH Bob Phillips "Paul Sheppard" wrote in message news:Paul.Sheppard.1rfp2h_1120125917.5871@excelfor um-nospam.com... I want to calculate the difference between todays date and dates in the future in days, hours and minutes eg Today 30/06/2005 10:37 Future date 03/07/2005 11:48 Difference 3 days 1 hour 11 minutes What formula should I use and how should the cells be formatted? Thanks for any help -- Paul Sheppard ------------------------------------------------------------------------ Paul Sheppard's Profile: http://www.excelforum.com/member.php...o&userid=24783 View this thread: http://www.excelforum.com/showthread...hreadid=383463 |
Hi Greg That worked ok for the example I gave, but when I use future dates that are months away I do not get the result I would expext eg Future Date 09/09/2005 08:54 Now 30/06/2005 11:23 Result 10:21:03 The hours and minutes look ok but not the days?????? -- Paul Sheppard ------------------------------------------------------------------------ Paul Sheppard's Profile: http://www.excelforum.com/member.php...o&userid=24783 View this thread: http://www.excelforum.com/showthread...hreadid=383463 |
Bob Thanks, that works fine Paul -- Paul Sheppard ------------------------------------------------------------------------ Paul Sheppard's Profile: http://www.excelforum.com/member.php...o&userid=24783 View this thread: http://www.excelforum.com/showthread...hreadid=383463 |
That is because the dd will only go up to 31, then it cycles back to 1. Been
caught by that myself <vbg -- HTH Bob Phillips "Paul Sheppard" wrote in message news:Paul.Sheppard.1rfruc_1120129521.3682@excelfor um-nospam.com... Hi Greg That worked ok for the example I gave, but when I use future dates that are months away I do not get the result I would expext eg Future Date 09/09/2005 08:54 Now 30/06/2005 11:23 Result 10:21:03 The hours and minutes look ok but not the days?????? -- Paul Sheppard ------------------------------------------------------------------------ Paul Sheppard's Profile: http://www.excelforum.com/member.php...o&userid=24783 View this thread: http://www.excelforum.com/showthread...hreadid=383463 |
All times are GMT +1. The time now is 08:20 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com