View Single Post
  #2   Report Post  
Govind
 
Posts: n/a
Default

Hi,

Am not sure i understood your question well. When you say a and b are
dates, do they include the respective time of that date as well. If so,
use this formula

=IF(A1="","",IF(HOUR(B1)10,DATEDIF(A1,B1,"D")+1,D ATEDIF(A1,B1,"D")))

where A1 is the checkin date & time and B1 is the Checkout date & time.

However, if you just store the dates in A1 and B1 and want to evaluate
the number of days based on the present time, use

IF(A13="","",IF(HOUR(NOW())10,DATEDIF(A13,B13,"D" )+1,DATEDIF(A13,B13,"D")))

However, be aware that the Now() function gets updated only when the
worksheet is calculated. It is not updated continuously.

Regards

Govind.

julieskennels wrote:
I want to perform the following calculation.
a & b are dates; c is number of days to be charged for
Check out is 10 am
if a is blank ; cis blank
If current time is after 10am result is b-a+1
if current time is before 10am result is b-a
Having trouble with the time part - sure it is something simple