Most of Bach's motets are difficult to date and  is no exception. Spitta assigned the motets that he knew, including , to Bach's Leipzig years, 1723 to 1750.
Many of Bach's motets are hard to date, and this particular one is no different.  Spitta identified those he was familiar with, including this one, as being from Bach's time in Leipzig between 1723 and 1750.