A:
If the matter is as you mentioned, there is no Zakah (obligatory charity) due on this money because it is vowed to be used as Sadaqah (voluntary charity) to build a Masjid.May Allah grant us success. May peace and blessings be upon our Prophet Muhammad, his family, and Companions.