how to identify the third friday of a particular month using sas
<p>I have a time series data. Data looks like the following:</p>

<pre><code>date            variable
01-Dec-2012     0.1
02-Dec-2012     0.1
03-Dec-2012     0.1
04-Dec-2012     0.1
05-Dec-2012     0.1
...
20-Dec-2012     0.1
21-Dec-2012     0.1
22-Dec-2012     0.1
</code></pre>

<p>I want to create a dummy variable which equals to 1 if date is in December and it is before or at the second Thursday. It equals to 0 if date is in December and after the second Thursday. It equals to missing if month(date) ^= 12.</p>

<p>Can anyone teach me how to identify the second Thursday of December and solve this problem please.</p>