+ Reply to Thread
Results 1 to 5 of 5

Excel 2007 : How can I find the number of "Nights" between 2 date?

  1. #1
    Registered User
    Join Date
    12-07-2009
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    2

    Question How can I find the number of "Nights" between 2 date?

    In cell A1 i had put a date with time (12/1/2009 11:55:00 AM) and in cell B1 another date (12/8/2009 11:55:00 AM). What i need is - in cell C1- total number of night between these dates.. Please help

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: How can I find the number of "Nights" between 2 date?

    Hi Jopi,

    welcome to this forum.

    Reading your question, I wonder...., what is your definition of "night"? Can you express in words what you would want Excel to look for and count?

    When does "night" start? 7pm? 10pm? When does "night" end. 5am?

    If your end date is 12/8/2009 05:55:00 AM, is that still within the night? Has the night passed? should it be counted?
    Last edited by teylyn; 12-08-2009 at 04:32 AM.

  3. #3
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: How can I find the number of "Nights" between 2 date?

    If on the off chance you mean in terms of "stay" (hotel) - then perhaps: =INT(B1)-INT(A1)

  4. #4
    Forum Expert darkyam's Avatar
    Join Date
    03-05-2008
    Location
    Houston, TX
    MS-Off Ver
    2013
    Posts
    2,191

    Re: How can I find the number of "Nights" between 2 date?

    DO, that kind of depends on the hotel's rules. Over here, at least, if you don't check out by a certain time (often 11am or noon), they charge you for another night. I think yours would have to be modified to ROUND(B1,0)-INT(A1) if noon checkout time or ROUND(B1+1/24,0)-INT(A1) if 11.

  5. #5
    Registered User
    Join Date
    12-07-2009
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: How can I find the number of "Nights" between 2 date?

    Thanks a lot. " =INT(B1)-INT(A1) " is working fine for me

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1