Hi,

I would like to add/substract a certain number of WEEKDAYS from a daily date (rdq). minus 10 and minus 30 WEEKDAYS. Can anyone help me? Thanks.

Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input long permno int rdq
51035 5497
42999 5514
27318 5520
19254 5521
38527 5521
51799 5521
52126 5521
19035 5521
50585 5522
26307 5522
36784 5522
42307 5522
44126 5522
44935 5522
21055 5522
36927 5522
51852 5523
25320 5523
46295 5523
12503 5527
37744 5527
56821 5527
22533 5527
53321 5528
32870 5528
21653 5528
27609 5528
44257 5529
29946 5529
27713 5529
56960 5529
19350 5529
57437 5529
46252 5529
40053 5529
29970 5529
26673 5529
54084 5529
47773 5529
54367 5529
21119 5529
18569 5529
19713 5530
46703 5530
37807 5530
18980 5530
37102 5530
32926 5530
44708 5530
54076 5531
48047 5533
19880 5533
34665 5533
32563 5533
41160 5533
41101 5533
27828 5533
60097 5533
42235 5533
65277 5533
56127 5533
33013 5534
22699 5534
21186 5534
35916 5534
45946 5534
48194 5534
42366 5534
40723 5534
49373 5535
51932 5535
54893 5535
50788 5535
60679 5535
44011 5536
44492 5536
28337 5536
40141 5536
50092 5536
45313 5536
46180 5536
39837 5536
45831 5537
61592 5537
62658 5537
44783 5537
39773 5537
42315 5537
52097 5537
23552 5537
48119 5537
51801 5537
52388 5537
31421 5540
47642 5540
26294 5540
57920 5540
39765 5540
45479 5540
26841 5540
end
format %td rdq