![]() |
count days between dates
Hello
I must be bleary eyed. Is there a VBA function which counts the number of days between two dates (as in the workbooks)? W |
count days between dates
Dates & times are stored as numbers.
Therefore simply subtracting one from the other will give you the tim between two dates. Note however that the date is the integer portio only. If you need look at only the dates and ignore the time portio use INT(a) - INT(b) or to round down to the nearest day int(a - b). Hope it helps -- Message posted from http://www.ExcelForum.com |
count days between dates
Just subtract one date from the other.
If you want working days, you can get at the NETWORKDAYS fu nction by setting a reference to ATPVBAEN.xks in TooleReferences, and then calll directly with Run. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "cogent" wrote in message ... Hello I must be bleary eyed. Is there a VBA function which counts the number of days between two dates (as in the workbooks)? W |
count days between dates
You just subtract
Dim a As Date, b As Date a = #6/1/2004# b = #6/10/2004# MsgBox b - a cogent wrote: Hello I must be bleary eyed. Is there a VBA function which counts the number of days between two dates (as in the workbooks)? W |
All times are GMT +1. The time now is 08:49 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com