Disregarding any rental/housing costs at your present location (ie, paying double rent for a few days), yes it does essentially come out in the wash for nearly all mortgages. People like to close at the end of the month because their initial cash outlay is less-because the per diem they have to pay on their new mortgage is less.
Nearly all mortgages charge interest in arrears, ie, the bank collects the interest for the month of June with the July payment. When you close on June 15th, for example, your first payment will not be until August 1st. At closing the bank will collect the interest per diem from the date of closing until the end of this month (here June 15th through June 30th). Therefore if you close on June 30th you will have to come up with less per diem interest at the closing.
No matter when you close, on nearly all mortgages (FHA and VA specifically excluded) you will pay interest to the date you pay off the bank. Therefore, regardless of when you close, you are only paying interest for the actual days your mortgage is in effect.
FHA and VA mortgages have an important quirk-they charge interest by the month, not the day. If you are the SELLER with a FHA or VA mortgage, it is important to you to get your payoff payment in to the bank on or before the last day of the month, or you can be charged a whole another month's interest. For these sellers, they are going to pay interest for the entire month of the closing anyway, regardless of when they close. For them, its best to close a few days before the end of the month (to allow for transmittal of their payoff funds in time).
That said, far too many people feel compelled to close on the last day of the month. You will get far better service and attention from your attorney, broker and lender if you pick a different time of the month. This is a significant factor that should not be overlooked.