Welcome to the Forum!
It would be helpful for everyone to know what version of Excel and what OS you're using. You can update your Profile to indicate that.
It would also help to provide a sample of the data you're working with. In this case is there a single cell with the date and time, two cells - one with date, one with time, or one cell with time (one of those for start and end). When posting data, please use XL2BB so people don't have to transcribe a screenshot before they can even start on a solution.
Also, VBA is not the answer to every problem. I personally dislike it - it's antiquated, difficult to code, maintain, and debug. In this case there's no apparent reason to use VBA instead of a simple formula.