Number of nights between two dates
Solved
Elowine
Posted messages
18
Registration date
Status
Membre
Last intervention
-
Elowine Posted messages 18 Registration date Status Membre Last intervention -
Elowine Posted messages 18 Registration date Status Membre Last intervention -
Hello
could you please tell me the formula to find the number of hotel nights between two dates?
cell A1 05/1/03/2015 arrival date
cell B2 07/03/2015 departure date that is 2 nights
cell C3 number of nights
thank you in advance
could you please tell me the formula to find the number of hotel nights between two dates?
cell A1 05/1/03/2015 arrival date
cell B2 07/03/2015 departure date that is 2 nights
cell C3 number of nights
thank you in advance
cool
You should know that dates are numeric values; it's the display format that's specific.
In B2 you entered 07/03/2015; but if you set the cell to standard format, it shows 42070, which is the number of days since January 1, 1900, the starting point of Excel's calendar.
And since in A1 the display in standard format is 42068, the difference in dates is a difference of these two numbers 42070-42068=2!
To satisfy your curiosity, I'm going to reveal to you that
it's the same for times, but with decimal numbers:
0.50 in standard format is 12:00:00 in time format, which is exactly noon
0.66 in standard format is 15:50:24 in time format, which is 3:50:24 PM
this explains why 0.50+0.66 results in 1.16, meaning one day, 3 hours, 50 minutes, and 24 seconds.
Thank you for these explanations! You know, I’ve never really had to use Excel except to create a basic little table and nothing more. What may seem obvious is not for me. I probably look ridiculous, and I hope it doesn’t bother anyone.
Thank you, have a good day.