Number of days between first and second record (same field)

Giganews Newsgroups
Subject: Number of days between first and second record (same field)
Posted by:  rama (chanat…@gmail.com)
Date: Sat, 21 Nov 2020

Hello
In my MS Access 2016 database table, I have four fields called ID, LoanID, =
LoanDate, and LoanAmount. Now I am facing a problem to calculate number of =
days between first loan and loan top-ups. Below shown is a typical example.
ID    LoanID    LoanDate LoanAmount
1    200    1/1/2020    $1000
2    200    07/1/2020    $500
10    200    11/1/2020    $500
I need to calculate number of days between initial loan date (1/1/2020) and=
first top-up (7/1/2020). And first top-up (11/1/2020) and second top-up (0=
7/1/2020). How this can be done in Access. Is there any inbuilt function fo=
r that. Currently there are so much data and not in a position to modify th=
e table in a better way. Kindly post your suggestions.=20

Appreciate your suggestions..
Thanks in advance.
Rama

Replies