He bought the hat at that store yesterday.
It was he that bought the hat at that store yesterday.
it was the hat that he bought at that store yesterday.
it was at that store that he bought the hat yesterday.
it wast yesterday that he bought the hat at that store.