Consider the following sentence:
Sorry for not being at home when they came. I had to be in the city.
The person who says it lives in some city and on that day he/she is still in the same city but has to run errands, not stay at home.
Is "in the city" used correctly in this particular context? Does it convey the idea?