I have a table that contains a start and end time.
ID start end
1 1/15/2004 12:00:00 PM 1/15/2004 2:00:00 PM
2 1/15/2004 10:30:00 PM 1/15/2004 11:00:00 PM
3 1/15/2004 11:00:00 PM 1/16/2004 12:30:00 AM
what I need is the total minutes between the 2 times for a date I pass in. But since id 3 rolls over into the next day I only want the total minutes up until 11:59, for the 15th and then I want the remaining minutes to be associated with the 16th
so it would end up something like this
date total minutes
1/15/2004 209
because
1 120
2 30
3 59
1/16/2004 30
because
3 30
hopefully that makes enough sense.
ID start end
1 1/15/2004 12:00:00 PM 1/15/2004 2:00:00 PM
2 1/15/2004 10:30:00 PM 1/15/2004 11:00:00 PM
3 1/15/2004 11:00:00 PM 1/16/2004 12:30:00 AM
what I need is the total minutes between the 2 times for a date I pass in. But since id 3 rolls over into the next day I only want the total minutes up until 11:59, for the 15th and then I want the remaining minutes to be associated with the 16th
so it would end up something like this
date total minutes
1/15/2004 209
because
1 120
2 30
3 59
1/16/2004 30
because
3 30
hopefully that makes enough sense.