Let's say I create a record in one table and then I create another record in the same table. I have the creation date & time. How can I calculate the delay in minutes between the actual record and the previous one?
Let's say that you have a field in this table that auto-enter's a creation timestamp into a field of type timestamp and we name the field: CreationTimestamp.
A second field of either number or type time can have this auto-enter calculation:
Let ( R = Get ( RecordNumber ) ; If ( R > 1 ; CreationTimeStamp - GetNthRecord ( CreationTimeStamp ; R - 1 ) ) )
If you choose a type of "time", you can format the field to show elapsed time in hours minutes seconds.
If you choose "Number", you can show elapsed time in seconds or you can divide to get a decimal value in minutes or hours
Let ( R = Get ( RecordNumber ) ; If ( R > 1 ; CreationTimeStamp - GetNthRecord ( CreationTimeStamp ; R - 1 ) ) ) / 3600
For example, would, for a number field, give you a value in hours such as 1.5 hours.
I forgot to mention that using a number field and dividing by 60 instead of 3600 would give you a decimal value measuring elapsed time in minutes.
Retrieving data ...