ANSWER:
This would not be considered as a full fledged itekaf as for itekaf one must spend the whole 10 days and nights in the masjid and you should only go out when necessary.
However, you can go during the day for work and can spend the nights in the masjid and only this part (night) would be considered as itekaf.