Running sum for time in Queries

avacess

Registered User.
Local time
Today, 10:04
Joined
Apr 28, 2011
Messages
16
Friends,

I need to calculate the running sum of the time difference. I know how to do it for numbers, but for time fields i have no clue,

sample table:

ID Start time End time
1 10:15 11:05
2 11:45 12:05
3 12:45 13:00
4 2:50 3:00
5 23:05 2:05

Sample query:

ID Start time End time TimeDiff RunningSum
1 10:15 11:05 00:50 00:50
2 11:45 12:05 00:25 01:15
3 12:45 13:00 00:15 01:30
4 2:50 3:00 00:10 01:40
5 23:05 2:05 3:00 4:40

Could you please give me a hint?
Thanks:)
 
Re: ... _Is it possible to have a Dsum in a query with the Domain in the same query?

Spikepl,

Thank you for your time. I created in a query (Q1) an expression (E1) using the Datediff function; in the same query (Q1) I am trying to create a running sum (E2) for E1, with domain in Q1, but somehow the it's giving me an error.

E2: (DSum("[E1]","Q1","[A]<=" & [A]))
A - number growing with 1 increment (or autonumber)

I can't get around the error. Please keep in mind that E2, E1, are part of the same Q1. Is any chance to make this running? Is it possible to have a Dsum in a query with the Domain in the same query?

Your help is much appreciated.
Thank you.
 

Users who are viewing this thread

Back
Top Bottom