C
chowda
Hello.
I have a table that I need to add a column that shows the time difference(in
minutes) between records.
ID date
1 4/15/06 11:30 PM
2 4/15/06 11:00 PM
3 4/15/06 10:00 PM
4 4/15/06 6:00 PM
5 4/15/06 1:00 PM
6 4/15/06 12:00 PM
7 4/15/06 11:00 AM
8 4/15/06 10:00 AM
9 4/15/06 6:00 AM
10 4/15/06 3:00 AM
11 4/15/06 2:00 AM
12 4/15/06 12:00 AM
The query would look like this..
ID date Minutes between records
1 4/15/06 11:30 PM 30
2 4/15/06 11:00 PM 60
3 4/15/06 10:00 PM 240
4 4/15/06 6:00 PM 300
5 4/15/06 1:00 PM 60
6 4/15/06 12:00 PM 60
7 4/15/06 11:00 AM 60
8 4/15/06 10:00 AM 240
9 4/15/06 6:00 AM 180
10 4/15/06 3:00 AM 60
11 4/15/06 2:00 AM 120
12 4/15/06 12:00 AM 0
Can someone help me out with this?
Thanks!
I have a table that I need to add a column that shows the time difference(in
minutes) between records.
ID date
1 4/15/06 11:30 PM
2 4/15/06 11:00 PM
3 4/15/06 10:00 PM
4 4/15/06 6:00 PM
5 4/15/06 1:00 PM
6 4/15/06 12:00 PM
7 4/15/06 11:00 AM
8 4/15/06 10:00 AM
9 4/15/06 6:00 AM
10 4/15/06 3:00 AM
11 4/15/06 2:00 AM
12 4/15/06 12:00 AM
The query would look like this..
ID date Minutes between records
1 4/15/06 11:30 PM 30
2 4/15/06 11:00 PM 60
3 4/15/06 10:00 PM 240
4 4/15/06 6:00 PM 300
5 4/15/06 1:00 PM 60
6 4/15/06 12:00 PM 60
7 4/15/06 11:00 AM 60
8 4/15/06 10:00 AM 240
9 4/15/06 6:00 AM 180
10 4/15/06 3:00 AM 60
11 4/15/06 2:00 AM 120
12 4/15/06 12:00 AM 0
Can someone help me out with this?
Thanks!