How many are you wanting to replace? Do you want to replace them all at once, or just as the tanks need to be replaced? Have you gotten any estimates on installing the tankless heaters? Installation can be high, depending upon how much plumbing needs to be done to make it work. For gas, the line needs to be a certain size. It could depend on codes in your city. My husband and I are fixing up a foreclosure that we bought to either sell or rent. The water heater was in the attic, which we thought was a terrible place for something that can leak. We got a tankless heater installed because it would fit in the laundry room. The cost was about $4000 for everything, and I think there was a $500 rebate from our energy company. This is in a single family home. In this case the tankless heater cost was far above what replacing the tank would have been, but we wanted the tank out of the attic and we hope the tankless will be attractive to buyers.
We are waiting to close on another home that has two water heaters that are over 25 years old, and not with totally correct plumbing. To replace the heaters and bring everything up to code, the cost approaches what one tankless would be. After the rebate it should cost around $700 more to go with the tankless. We will go with that option because the house will have 4 college students living in it and they could be using a lot of hot water at certain times of the day. The energy savings is a plus too.
It seems like doing a lot of apartments would be very expensive, but maybe you could get a package deal for getting a lot of them.