Get ( RecordNumber ) > 1 ; YourTimeStampField - GetNthRecord ( YourTimeStampField ; Get ( RecordNumber ) - 1 )
result of type time.
P.S.: the result of that calculation must be UNSTORED
La ringrazio per il vostro aiuto
In fact the solution you achieved works very well for an unsorted database.
But what I need is a solution for when I have to group and sort data.
I will try to explain
A - I have a race with 10 racers.
B - When the race starts I reset the system clock to 0h 0m 0s
C - every time a racer cross the finish line, after a lap, I create a new record with the racer number (manually) and the time he cross the finish line (automatic),
D - I do this until the race finishes for every pass at the fish line and obviously for every racer.
E - Then I grouped the records by racer number and I would like to calc the time by lap for each racer
PS: Your English is very good
I am portuguese, from Azores islands
...the solution you achieved works very well for an unsorted database.
The solution works on each found set and, to give exact results, MUST be sorted.
You should define a self-join relationship between the lap records, something like:
Laps:RacerID = Laps 2::RacerID
Laps::LapID > Laps2::LapID
with records from Laps ID sorted by LapID, descending. Then you can auto-enter the finish time from the first related record in Laps 2 into the start field.