Difference-in-differences Matching
You can use mark. For example, if the treatment was done in the year 2000, and your time variable is called time, the syntax is

mark treatment if time &gt;= 2000 &amp; time &lt;.

where treatment is the dummy that is generated.