I'm working with SAS and I have a data frame like this:
table1
+------+------------+-----------+
| name | date | time |
+------+------------+-----------+
| A | 7-May-08 | 09:01:41 |
| A | 7-May-08 | 09:01:41 |
| A | 7-May-08 | 09:03:20 |
| A | 7-May-08 | 09:04:41 |
| A | 7-May-08 | 11:32:41 |
| A | 8-May-08 | 09:06:00 |
| A | 8-May-08 | 09:06:01 |
| A | 8-May-08 | 12:32:41 |
| B | 7-May-08 | 09:00:01 |
| B | 7-May-08 | 09:00:01 |
| B | 7-May-08 | 11:33:41 |
| B | 9-May-08 | 09:05:59 |
| B | 9-May-08 | 11:35:41 |
| B | 9-May-08 | 11:36:41 |
| B | 9-May-08 | 11:37:41 |
| B | 12-May-08 | 11:27:41 |
| B | 12-May-08 | 11:27:41 |
+------+------------+-----------+
Now I want to do two main operations:
1- If time value for each name and date variables is between 9:00:01 and 9:05:59 minutes then delete first row in this interval;
2- For the previous step, If the time value of next rows is the same with first row then delete all of them in this interval.
For example table1 at last should be like this:
+------+-----------+----------+
| name | date | time |
+------+-----------+----------+
| A | 7-May-08 | 09:03:20 |
| A | 7-May-08 | 9:04:41 |
| A | 7-May-08 | 11:32:41 |
| A | 8-May-08 | 9:06:00 |
| A | 8-May-08 | 9:06:01 |
| A | 8-May-08 | 12:32:41 |
| B | 7-May-08 | 11:33:41 |
| B | 9-May-08 | 11:35:41 |
| B | 9-May-08 | 11:36:41 |
| B | 9-May-08 | 11:37:41 |
| B | 12-May-08 | 11:27:41 |
| B | 12-May-08 | 11:27:41 |
+------+-----------+----------+
How can I do that?