This question already has an answer here:

I have a UK visa as the spouse visa of a British citizen and it is expiring in mid-September. I have plans to visit India exactly a month before the expiry date of this visa. Will it cause any issues at Immigration when I enter the UK a month before my visa expires?

marked as duplicate by Giorgio, Jan, mts, Ali Awan, David Richerby Jul 9 '17 at 20:17

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.