以下のようなデータがあり、まとめを作成したいと考えています。以下の望ましい出力を参照してください。
データ
ID TIMEIN TIMEOUT
1 10/01/2013 8:00AM 10/01/2013 5:00PM
1 10/02/2013 8:00AM 10/01/2013 5:00PM
1 10/03/2013 8:00AM 10/01/2013 5:00PM
1 10/04/2013 8:00AM 10/01/2013 5:00PM
1 10/05/2013 8:00AM 10/01/2013 5:00PM
3 10/01/2013 8:10AM 10/01/2013 5:00PM
3 10/02/2013 8:02AM 10/01/2013 5:00PM
3 10/03/2013 8:04AM 10/01/2013 5:00PM
3 10/04/2013 8:20AM 10/01/2013 5:00PM
3 10/05/2013 8:03AM 10/01/2013 5:00PM
4 10/01/2013 8:10AM 10/01/2013 5:00PM
4 10/02/2013 8:02AM 10/01/2013 5:00PM
4 10/03/2013 8:04AM 10/01/2013 5:00PM
4 10/04/2013 8:20AM 10/01/2013 5:00PM
4 10/05/2013 8:03AM 10/01/2013 5:00PM
望ましい出力
ID 10/01/2013 10/02/2013 10/03/2013 10/04/2013 10/05/2013
IN OUT IN OUT IN OUT IN OUT IN OUT
1 8:00AM 5:00PM 8:00AM 5:00PM 8:00AM 5:00PM 8:00AM 5:00PM 8:00AM 5:00PM
3 8:10AM 5:00PM 8:02AM 5:00PM 8:04AM 5:00PM 8:20AM 5:00PM 8:03AM 5:00PM
4 8:10AM 5:00PM 8:02AM 5:00PM 8:04AM 5:00PM 8:20AM 5:00PM 8:03AM 5:00PM
また
ID 10/01/2013 10/02/2013 10/03/2013 10/04/2013 10/05/2013
1 8:00AM 5:00PM 8:00AM 5:00PM 8:00AM 5:00PM 8:00AM 5:00PM 8:00AM 5:00PM
3 8:10AM 5:00PM 8:02AM 5:00PM 8:04AM 5:00PM 8:20AM 5:00PM 8:03AM 5:00PM
4 8:10AM 5:00PM 8:02AM 5:00PM 8:04AM 5:00PM 8:20AM 5:00PM 8:03AM 5:00PM
提供されたデータを使用してこの出力を取得するにはどうすればよいですか?