The problem I see isn't the preposition "by". It's modality. Try adding the modals 'will' and 'would', like this,
By (this) April, we will have known each other for 3 years.
By (this) April, we would have known each other for 3 years. (we are not friends anymore)
- For Teachers